{"modulePath":"github.com/worklydev/workly","version":"v0.5.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package client\n\nPackage client provides primitives to interact with the openapi HTTP API.\n\nCode generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.\n\nPackage client is a Go client for the Workly API, generated from api/openapi.yaml. The CLI uses it; it isn't public API.\n\n## Functions\n\n```go\nfunc NewCancelPendingTasksRequest(server string, queue QueueName) (*http.Request, error)\n```\nNewCancelPendingTasksRequest constructs an http.Request for the CancelPendingTasks method\n\n```go\nfunc NewCancelRunRequest(server string, id RunID) (*http.Request, error)\n```\nNewCancelRunRequest constructs an http.Request for the CancelRun method\n\n```go\nfunc NewCancelTaskRequest(server string, id TaskID) (*http.Request, error)\n```\nNewCancelTaskRequest constructs an http.Request for the CancelTask method\n\n```go\nfunc NewCancelWorkflowRunRequest(server string, id WorkflowRunID) (*http.Request, error)\n```\nNewCancelWorkflowRunRequest constructs an http.Request for the CancelWorkflowRun method\n\n```go\nfunc NewCloseGroupRequest(server string, id GroupID) (*http.Request, error)\n```\nNewCloseGroupRequest constructs an http.Request for the CloseGroup method\n\n```go\nfunc NewCreateAlertChannelRequest(server string, body CreateAlertChannelJSONRequestBody) (*http.Request, error)\n```\nNewCreateAlertChannelRequest calls the generic CreateAlertChannel builder with application/json body\n\n```go\nfunc NewCreateAlertChannelRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)\n```\nNewCreateAlertChannelRequestWithBody constructs an http.Request for the CreateAlertChannel method, with any body, and a specified content type\n\n```go\nfunc NewCreateGroupRequest(server string, body CreateGroupJSONRequestBody) (*http.Request, error)\n```\nNewCreateGroupRequest calls the generic CreateGroup builder with application/json body\n\n```go\nfunc NewCreateGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)\n```\nNewCreateGroupRequestWithBody constructs an http.Request for the CreateGroup method, with any body, and a specified content type\n\n```go\nfunc NewCreateTaskRequest(server string, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody) (*http.Request, error)\n```\nNewCreateTaskRequest calls the generic CreateTask builder with application/json body\n\n```go\nfunc NewCreateTaskRequestWithBody(server string, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader) (*http.Request, error)\n```\nNewCreateTaskRequestWithBody constructs an http.Request for the CreateTask method, with any body, and a specified content type\n\n```go\nfunc NewCreateTasksRequest(server string, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody) (*http.Request, error)\n```\nNewCreateTasksRequest calls the generic CreateTasks builder with application/json body\n\n```go\nfunc NewCreateTasksRequestWithBody(server string, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader) (*http.Request, error)\n```\nNewCreateTasksRequestWithBody constructs an http.Request for the CreateTasks method, with any body, and a specified content type\n\n```go\nfunc NewDeleteAlertChannelRequest(server string, id AlertChannelID) (*http.Request, error)\n```\nNewDeleteAlertChannelRequest constructs an http.Request for the DeleteAlertChannel method\n\n```go\nfunc NewDeleteQueueRequest(server string, queue QueueName) (*http.Request, error)\n```\nNewDeleteQueueRequest constructs an http.Request for the DeleteQueue method\n\n```go\nfunc NewDeleteScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)\n```\nNewDeleteScheduleRequest constructs an http.Request for the DeleteSchedule method\n\n```go\nfunc NewDeleteWorkflowRequest(server string, workflow WorkflowName) (*http.Request, error)\n```\nNewDeleteWorkflowRequest constructs an http.Request for the DeleteWorkflow method\n\n```go\nfunc NewGetActivityRequest(server string, params *GetActivityParams) (*http.Request, error)\n```\nNewGetActivityRequest constructs an http.Request for the GetActivity method\n\n```go\nfunc NewGetGroupRequest(server string, id GroupID) (*http.Request, error)\n```\nNewGetGroupRequest constructs an http.Request for the GetGroup method\n\n```go\nfunc NewGetHealthzRequest(server string) (*http.Request, error)\n```\nNewGetHealthzRequest constructs an http.Request for the GetHealthz method\n\n```go\nfunc NewGetQueueActivityRequest(server string, queue QueueName, params *GetQueueActivityParams) (*http.Request, error)\n```\nNewGetQueueActivityRequest constructs an http.Request for the GetQueueActivity method\n\n```go\nfunc NewGetQueueFailuresRequest(server string, queue QueueName, params *GetQueueFailuresParams) (*http.Request, error)\n```\nNewGetQueueFailuresRequest constructs an http.Request for the GetQueueFailures method\n\n```go\nfunc NewGetQueueRequest(server string, queue QueueName) (*http.Request, error)\n```\nNewGetQueueRequest constructs an http.Request for the GetQueue method\n\n```go\nfunc NewGetReadyzRequest(server string) (*http.Request, error)\n```\nNewGetReadyzRequest constructs an http.Request for the GetReadyz method\n\n```go\nfunc NewGetRunDeliveryRequest(server string, id RunID) (*http.Request, error)\n```\nNewGetRunDeliveryRequest constructs an http.Request for the GetRunDelivery method\n\n```go\nfunc NewGetRunRequest(server string, id RunID) (*http.Request, error)\n```\nNewGetRunRequest constructs an http.Request for the GetRun method\n\n```go\nfunc NewGetScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)\n```\nNewGetScheduleRequest constructs an http.Request for the GetSchedule method\n\n```go\nfunc NewGetTaskDeliveryRequest(server string, id TaskID) (*http.Request, error)\n```\nNewGetTaskDeliveryRequest constructs an http.Request for the GetTaskDelivery method\n\n```go\nfunc NewGetTaskRequest(server string, id TaskID) (*http.Request, error)\n```\nNewGetTaskRequest constructs an http.Request for the GetTask method\n\n```go\nfunc NewGetWorkflowRequest(server string, workflow WorkflowName) (*http.Request, error)\n```\nNewGetWorkflowRequest constructs an http.Request for the GetWorkflow method\n\n```go\nfunc NewGetWorkflowRunRequest(server string, id WorkflowRunID) (*http.Request, error)\n```\nNewGetWorkflowRunRequest constructs an http.Request for the GetWorkflowRun method\n\n```go\nfunc NewListAlertChannelsRequest(server string) (*http.Request, error)\n```\nNewListAlertChannelsRequest constructs an http.Request for the ListAlertChannels method\n\n```go\nfunc NewListAttemptsRequest(server string, id TaskID) (*http.Request, error)\n```\nNewListAttemptsRequest constructs an http.Request for the ListAttempts method\n\n```go\nfunc NewListGroupsRequest(server string, params *ListGroupsParams) (*http.Request, error)\n```\nNewListGroupsRequest constructs an http.Request for the ListGroups method\n\n```go\nfunc NewListQueuesRequest(server string) (*http.Request, error)\n```\nNewListQueuesRequest constructs an http.Request for the ListQueues method\n\n```go\nfunc NewListRunAttemptsRequest(server string, id RunID) (*http.Request, error)\n```\nNewListRunAttemptsRequest constructs an http.Request for the ListRunAttempts method\n\n```go\nfunc NewListRunsRequest(server string, params *ListRunsParams) (*http.Request, error)\n```\nNewListRunsRequest constructs an http.Request for the ListRuns method\n\n```go\nfunc NewListSchedulesRequest(server string) (*http.Request, error)\n```\nNewListSchedulesRequest constructs an http.Request for the ListSchedules method\n\n```go\nfunc NewListTasksRequest(server string, queue QueueName, params *ListTasksParams) (*http.Request, error)\n```\nNewListTasksRequest constructs an http.Request for the ListTasks method\n\n```go\nfunc NewListWorkflowRunsRequest(server string, params *ListWorkflowRunsParams) (*http.Request, error)\n```\nNewListWorkflowRunsRequest constructs an http.Request for the ListWorkflowRuns method\n\n```go\nfunc NewListWorkflowsRequest(server string) (*http.Request, error)\n```\nNewListWorkflowsRequest constructs an http.Request for the ListWorkflows method\n\n```go\nfunc NewPauseQueueRequest(server string, queue QueueName) (*http.Request, error)\n```\nNewPauseQueueRequest constructs an http.Request for the PauseQueue method\n\n```go\nfunc NewPauseScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)\n```\nNewPauseScheduleRequest constructs an http.Request for the PauseSchedule method\n\n```go\nfunc NewPreviewCronRequest(server string, params *PreviewCronParams) (*http.Request, error)\n```\nNewPreviewCronRequest constructs an http.Request for the PreviewCron method\n\n```go\nfunc NewPutQueueRequest(server string, queue QueueName, body PutQueueJSONRequestBody) (*http.Request, error)\n```\nNewPutQueueRequest calls the generic PutQueue builder with application/json body\n\n```go\nfunc NewPutQueueRequestWithBody(server string, queue QueueName, contentType string, body io.Reader) (*http.Request, error)\n```\nNewPutQueueRequestWithBody constructs an http.Request for the PutQueue method, with any body, and a specified content type\n\n```go\nfunc NewPutScheduleRequest(server string, schedule ScheduleName, body PutScheduleJSONRequestBody) (*http.Request, error)\n```\nNewPutScheduleRequest calls the generic PutSchedule builder with application/json body\n\n```go\nfunc NewPutScheduleRequestWithBody(server string, schedule ScheduleName, contentType string, body io.Reader) (*http.Request, error)\n```\nNewPutScheduleRequestWithBody constructs an http.Request for the PutSchedule method, with any body, and a specified content type\n\n```go\nfunc NewPutWorkflowRequest(server string, workflow WorkflowName, body PutWorkflowJSONRequestBody) (*http.Request, error)\n```\nNewPutWorkflowRequest calls the generic PutWorkflow builder with application/json body\n\n```go\nfunc NewPutWorkflowRequestWithBody(server string, workflow WorkflowName, contentType string, body io.Reader) (*http.Request, error)\n```\nNewPutWorkflowRequestWithBody constructs an http.Request for the PutWorkflow method, with any body, and a specified content type\n\n```go\nfunc NewResumeQueueRequest(server string, queue QueueName) (*http.Request, error)\n```\nNewResumeQueueRequest constructs an http.Request for the ResumeQueue method\n\n```go\nfunc NewResumeScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)\n```\nNewResumeScheduleRequest constructs an http.Request for the ResumeSchedule method\n\n```go\nfunc NewRetryFailedTasksRequest(server string, queue QueueName, params *RetryFailedTasksParams) (*http.Request, error)\n```\nNewRetryFailedTasksRequest constructs an http.Request for the RetryFailedTasks method\n\n```go\nfunc NewRetryRunRequest(server string, id RunID) (*http.Request, error)\n```\nNewRetryRunRequest constructs an http.Request for the RetryRun method\n\n```go\nfunc NewRetryTaskRequest(server string, id TaskID) (*http.Request, error)\n```\nNewRetryTaskRequest constructs an http.Request for the RetryTask method\n\n```go\nfunc NewRetryWorkflowRunRequest(server string, id WorkflowRunID) (*http.Request, error)\n```\nNewRetryWorkflowRunRequest constructs an http.Request for the RetryWorkflowRun method\n\n```go\nfunc NewSearchTasksRequest(server string, params *SearchTasksParams) (*http.Request, error)\n```\nNewSearchTasksRequest constructs an http.Request for the SearchTasks method\n\n```go\nfunc NewStartWorkflowRunRequest(server string, workflow WorkflowName, body StartWorkflowRunJSONRequestBody) (*http.Request, error)\n```\nNewStartWorkflowRunRequest calls the generic StartWorkflowRun builder with application/json body\n\n```go\nfunc NewStartWorkflowRunRequestWithBody(server string, workflow WorkflowName, contentType string, body io.Reader) (*http.Request, error)\n```\nNewStartWorkflowRunRequestWithBody constructs an http.Request for the StartWorkflowRun method, with any body, and a specified content type\n\n```go\nfunc NewTestAlertChannelRequest(server string, id AlertChannelID) (*http.Request, error)\n```\nNewTestAlertChannelRequest constructs an http.Request for the TestAlertChannel method\n\n```go\nfunc NewTriggerScheduleRequest(server string, schedule ScheduleName) (*http.Request, error)\n```\nNewTriggerScheduleRequest constructs an http.Request for the TriggerSchedule method\n\n## Types\n\n```go\ntype Activity struct {\n\tBucketSeconds int              `json:\"bucket_seconds\"`\n\tBuckets       []ActivityBucket `json:\"buckets\"`\n\tRange         ActivityRange    `json:\"range\"`\n\n\t// RetentionSeconds How long the server keeps finished tasks (`WORKLY_RETENTION`).\n\t// Absent if it keeps them forever.\n\tRetentionSeconds *float64 `json:\"retention_seconds,omitempty\"`\n}\n```\nActivity defines model for Activity.\n\n```go\ntype ActivityBucket struct {\n\t// Counts Tasks created in the bucket, by queue; queues with none are left out.\n\tCounts map[string]int `json:\"counts\"`\n\n\t// Failed Tasks of every queue that finished in the bucket and failed.\n\tFailed int       `json:\"failed\"`\n\tStart  time.Time `json:\"start\"`\n\n\t// Succeeded Tasks of every queue that finished in the bucket and succeeded.\n\tSucceeded int `json:\"succeeded\"`\n}\n```\nActivityBucket defines model for ActivityBucket.\n\n```go\ntype ActivityRange string\n```\nActivityRange defines model for Activity.Range.\n\n```go\nconst (\n\tActivityRangeN1h  ActivityRange = \"1h\"\n\tActivityRangeN24h ActivityRange = \"24h\"\n\tActivityRangeN7d  ActivityRange = \"7d\"\n)\n```\nDefines values for ActivityRange.\n\n```go\nfunc (e ActivityRange) Valid() bool\n```\nValid indicates whether the value is a known member of the ActivityRange enum.\n\n```go\ntype AlertChannel struct {\n\tCreatedAt time.Time `json:\"created_at\"`\n\n\t// Id Example: ach_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId string `json:\"id\"`\n\n\t// Target The email address, or the Slack webhook URL with its secret part\n\t// hidden.\n\tTarget string           `json:\"target\"`\n\tType   AlertChannelType `json:\"type\"`\n}\n```\nAlertChannel defines model for AlertChannel.\n\n```go\ntype AlertChannelID = string\n```\nAlertChannelID defines model for AlertChannelID.\n\n```go\ntype AlertChannelList struct {\n\tChannels []AlertChannel `json:\"channels\"`\n\n\t// EmailEnabled Whether this server can send email, so email channels can be added.\n\tEmailEnabled bool `json:\"email_enabled\"`\n}\n```\nAlertChannelList defines model for AlertChannelList.\n\n```go\ntype AlertChannelType string\n```\nAlertChannelType defines model for AlertChannelType.\n\n```go\nconst (\n\tEmail AlertChannelType = \"email\"\n\tSlack AlertChannelType = \"slack\"\n)\n```\nDefines values for AlertChannelType.\n\n```go\nfunc (e AlertChannelType) Valid() bool\n```\nValid indicates whether the value is a known member of the AlertChannelType enum.\n\n```go\ntype Attempt struct {\n\tDurationMs int       `json:\"duration_ms\"`\n\tError      *string   `json:\"error,omitempty\"`\n\tFinishedAt time.Time `json:\"finished_at\"`\n\tId         string    `json:\"id\"`\n\tNumber     int       `json:\"number\"`\n\n\t// Outcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tOutcome Outcome `json:\"outcome\"`\n\n\t// ResponseBody The first 4 KB of the response body.\n\tResponseBody *string `json:\"response_body,omitempty\"`\n\n\t// ResponseHeaders Selected response headers (Content-Type, Retry-After, Location).\n\tResponseHeaders map[string]string `json:\"response_headers\"`\n\n\t// RetriedAt Set when the task or run was retried by hand between the previous\n\t// attempt and this one: when that happened. Absent for automatic\n\t// retries.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\tStartedAt time.Time  `json:\"started_at\"`\n\n\t// StatusCode Absent if there was no response.\n\tStatusCode *int `json:\"status_code,omitempty\"`\n}\n```\nAttempt defines model for Attempt.\n\n```go\ntype AttemptList struct {\n\tAttempts []Attempt `json:\"attempts\"`\n}\n```\nAttemptList defines model for AttemptList.\n\n```go\ntype AutoPauseConfig struct {\n\tAfterFailures int `json:\"after_failures\"`\n}\n```\nAutoPauseConfig Pause the queue by itself when its endpoint looks down: after \\`after\\_failures\\` attempts in a row end with a 5xx, a timeout or a network error. Other 4xx responses, 429 and lost attempts don't count, and only a success resets the count. While auto-paused, tasks wait without using attempts, and one task at a time goes as a probe: 30 seconds after the pause, then after twice as long each time it fails, up to every 10 minutes. The first success resumes the queue. Resuming it by hand does too. Omit for no auto-pause. Not for queues whose tasks go to many endpoints, where one being down would hold up the rest; Workly's own queues can't have it.\n\n```go\ntype AutoPaused struct {\n\t// Error The error of the attempt that paused it, or of the latest failed probe.\n\tError string `json:\"error\"`\n\n\t// NextProbeAt When the next probe goes, unless one is in flight, in which case\n\t// its result sets the next. No probes go while the queue is also\n\t// paused by hand.\n\tNextProbeAt time.Time `json:\"next_probe_at\"`\n\n\t// Probes Probes that failed since it paused.\n\tProbes int `json:\"probes\"`\n\n\t// Since When it paused.\n\tSince time.Time `json:\"since\"`\n}\n```\nAutoPaused The queue paused itself after failures in a row (see \\`auto\\_pause\\`). Absent when it hasn't, or once it resumed.\n\n```go\ntype BatchEnqueueRequest struct {\n\tTasks []EnqueueRequest `json:\"tasks\"`\n}\n```\nBatchEnqueueRequest defines model for BatchEnqueueRequest.\n\n```go\ntype BatchEnqueueResponse struct {\n\tResults []BatchEnqueueResult `json:\"results\"`\n}\n```\nBatchEnqueueResponse defines model for BatchEnqueueResponse.\n\n```go\ntype BatchEnqueueResult struct {\n\t// Created False if a task with the same idempotency key already existed.\n\tCreated bool `json:\"created\"`\n\tTask    Task `json:\"task\"`\n}\n```\nBatchEnqueueResult defines model for BatchEnqueueResult.\n\n```go\ntype Callback struct {\n\t// Headers Headers sent with the callback. `Workly-*` headers are reserved.\n\tHeaders *map[string]string `json:\"headers,omitempty\"`\n\n\t// Url The http(s) URL to deliver the callback to.\n\t//\n\t// Example: https://api.example.com/jobs/refresh-views\n\tUrl string `json:\"url\"`\n}\n```\nCallback A task Workly enqueues when something completes: a \\`POST\\` to \\`url\\` whose JSON body says what completed (\\`TaskSummary\\` for a task, \\`RunSummary\\` for a schedule's run, \\`GroupSummary\\` for a group). Callbacks go to \\`\\_callbacks\\`, a queue Workly creates for them, and are delivered like any task in it, with its retries; its settings can be changed like any queue's.\n\nA task's or a schedule's callback is called each time the task or a run succeeds, fails or is cancelled, and again if it is retried by hand and finishes again; skipped runs don't call it. A group's is called once, when the group completes.\n\n```go\ntype CancelPendingResult struct {\n\t// Cancelled How many pending tasks were cancelled.\n\tCancelled int `json:\"cancelled\"`\n}\n```\nCancelPendingResult defines model for CancelPendingResult.\n\n```go\ntype CancelPendingTasksResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *CancelPendingResult\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseCancelPendingTasksResponse(rsp *http.Response) (*CancelPendingTasksResponse, error)\n```\nParseCancelPendingTasksResponse parses an HTTP response from a CancelPendingTasksWithResponse call\n\n```go\nfunc (r CancelPendingTasksResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r CancelPendingTasksResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r CancelPendingTasksResponse) GetJSON200() *CancelPendingResult\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r CancelPendingTasksResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r CancelPendingTasksResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r CancelPendingTasksResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype CancelRunResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Run\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseCancelRunResponse(rsp *http.Response) (*CancelRunResponse, error)\n```\nParseCancelRunResponse parses an HTTP response from a CancelRunWithResponse call\n\n```go\nfunc (r CancelRunResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r CancelRunResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r CancelRunResponse) GetJSON200() *Run\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r CancelRunResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r CancelRunResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r CancelRunResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype CancelTaskResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Task\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseCancelTaskResponse(rsp *http.Response) (*CancelTaskResponse, error)\n```\nParseCancelTaskResponse parses an HTTP response from a CancelTaskWithResponse call\n\n```go\nfunc (r CancelTaskResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r CancelTaskResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r CancelTaskResponse) GetJSON200() *Task\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r CancelTaskResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r CancelTaskResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r CancelTaskResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype CancelWorkflowRunResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *WorkflowRun\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseCancelWorkflowRunResponse(rsp *http.Response) (*CancelWorkflowRunResponse, error)\n```\nParseCancelWorkflowRunResponse parses an HTTP response from a CancelWorkflowRunWithResponse call\n\n```go\nfunc (r CancelWorkflowRunResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r CancelWorkflowRunResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r CancelWorkflowRunResponse) GetJSON200() *WorkflowRun\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r CancelWorkflowRunResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r CancelWorkflowRunResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r CancelWorkflowRunResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype Client struct {\n\t// The endpoint of the server conforming to this interface, with scheme,\n\t// https://api.deepmap.com for example. This can contain a path relative\n\t// to the server, such as https://api.deepmap.com/dev-test, and all the\n\t// paths in the swagger spec will be appended to the server.\n\tServer string\n\n\t// Doer for performing requests, typically a *http.Client with any\n\t// customized settings, such as certificate chains.\n\tClient HttpRequestDoer\n\n\t// A list of callbacks for modifying requests which are generated before sending over\n\t// the network.\n\tRequestEditors []RequestEditorFn\n}\n```\nClient which conforms to the OpenAPI3 specification for this service.\n\n```go\nfunc NewClient(server string, opts ...ClientOption) (*Client, error)\n```\nCreates a new Client, with reasonable defaults\n\n```go\nfunc (c *Client) CancelPendingTasks(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCancelPendingTasks Cancel a queue's pending tasks\n\nCancels every pending task, including scheduled ones and ones waiting to retry, as \\`POST /v1/tasks/{id}/cancel\\` does for one task. Running tasks finish their attempt. Cancelled tasks stay in the history until retention removes them, and can be retried.\n\nCorresponds with POST /v1/queues/{queue}/cancel-pending (the \\`CancelPendingTasks\\` operationId).\n\n```go\nfunc (c *Client) CancelRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCancelRun Cancel a run\n\nCancels a pending or running run. A running run's current attempt finishes and is recorded, but the run isn't retried. Cancelling a cancelled run does nothing; a finished or skipped run can't be cancelled (\\`invalid\\_state\\`).\n\nCorresponds with POST /v1/runs/{id}/cancel (the \\`CancelRun\\` operationId).\n\n```go\nfunc (c *Client) CancelTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCancelTask Cancel a task\n\nCancels a pending or running task. A running task's current attempt finishes and is recorded, but the task isn't retried. Cancelling a cancelled task does nothing; a succeeded or failed task can't be cancelled (\\`invalid\\_state\\`).\n\nCorresponds with POST /v1/tasks/{id}/cancel (the \\`CancelTask\\` operationId).\n\n```go\nfunc (c *Client) CancelWorkflowRun(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCancelWorkflowRun Cancel a workflow run\n\nSteps that haven't started are skipped, and their pending tasks cancelled. Requests already being delivered finish and are recorded, but start nothing. Cancelling a cancelled run is a no-op; other finished runs are \\`invalid\\_state\\`.\n\nCorresponds with POST /v1/workflow-runs/{id}/cancel (the \\`CancelWorkflowRun\\` operationId).\n\n```go\nfunc (c *Client) CloseGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCloseGroup Close a task group\n\nStops the group from accepting tasks; enqueueing into it then fails with \\`group\\_closed\\`. If its tasks have all finished (or it has none), it completes at once. Closing a closed group does nothing.\n\nCorresponds with POST /v1/groups/{id}/close (the \\`CloseGroup\\` operationId).\n\n```go\nfunc (c *Client) CreateAlertChannel(ctx context.Context, body CreateAlertChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCreateAlertChannel Add an alert channel\n\nA workspace has at most 10 channels. Email channels need a server that can send email (\\`email\\_enabled\\` in the list); a Slack channel takes an incoming webhook URL (\\`[https://hooks.slack.com/](https://hooks.slack.com/)...\\`).\n\nTakes a body of the \\`application/json\\` content type.\n\nCorresponds with POST /v1/alert-channels (the \\`CreateAlertChannel\\` operationId).\n\n```go\nfunc (c *Client) CreateAlertChannelWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCreateAlertChannelWithBody Add an alert channel\n\nA workspace has at most 10 channels. Email channels need a server that can send email (\\`email\\_enabled\\` in the list); a Slack channel takes an incoming webhook URL (\\`[https://hooks.slack.com/](https://hooks.slack.com/)...\\`).\n\nTakes any type of body and a specified content type.\n\nCorresponds with POST /v1/alert-channels (the \\`CreateAlertChannel\\` operationId).\n\n```go\nfunc (c *Client) CreateGroup(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCreateGroup Create a task group\n\nCreates an open group. Enqueue tasks into it with \\`group\\_id\\`, then close it with \\`POST /v1/groups/{id}/close\\`. Once it is closed and every task in it has succeeded, failed or been cancelled, it completes and enqueues its \\`on\\_complete\\` callback, once.\n\nIf \\`idempotency\\_key\\` matches an existing group, that group is returned with status 200 and nothing is created.\n\nTakes a body of the \\`application/json\\` content type.\n\nCorresponds with POST /v1/groups (the \\`CreateGroup\\` operationId).\n\n```go\nfunc (c *Client) CreateGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCreateGroupWithBody Create a task group\n\nCreates an open group. Enqueue tasks into it with \\`group\\_id\\`, then close it with \\`POST /v1/groups/{id}/close\\`. Once it is closed and every task in it has succeeded, failed or been cancelled, it completes and enqueues its \\`on\\_complete\\` callback, once.\n\nIf \\`idempotency\\_key\\` matches an existing group, that group is returned with status 200 and nothing is created.\n\nTakes any type of body and a specified content type.\n\nCorresponds with POST /v1/groups (the \\`CreateGroup\\` operationId).\n\n```go\nfunc (c *Client) CreateTask(ctx context.Context, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCreateTask Enqueue a task\n\nThe queue is created with default settings if it doesn't exist, unless the server runs with \\`WORKLY\\_AUTO\\_CREATE\\_QUEUES=false\\`.\n\nIf \\`idempotency\\_key\\` matches an existing task in the queue, that task is returned with status 200 and nothing is enqueued.\n\nTakes a body of the \\`application/json\\` content type.\n\nCorresponds with POST /v1/queues/{queue}/tasks (the \\`CreateTask\\` operationId).\n\n```go\nfunc (c *Client) CreateTaskWithBody(ctx context.Context, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCreateTaskWithBody Enqueue a task\n\nThe queue is created with default settings if it doesn't exist, unless the server runs with \\`WORKLY\\_AUTO\\_CREATE\\_QUEUES=false\\`.\n\nIf \\`idempotency\\_key\\` matches an existing task in the queue, that task is returned with status 200 and nothing is enqueued.\n\nTakes any type of body and a specified content type.\n\nCorresponds with POST /v1/queues/{queue}/tasks (the \\`CreateTask\\` operationId).\n\n```go\nfunc (c *Client) CreateTasks(ctx context.Context, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCreateTasks Enqueue up to 100 tasks at once\n\nEnqueues all the tasks or none: if any task is invalid, nothing is enqueued and the error names the first invalid one (\\`tasks\\[3]: ...\\`). Idempotency keys work as for a single enqueue, including between tasks in the same batch.\n\nThe whole request is limited to the payload limit plus 256 KB.\n\nTakes a body of the \\`application/json\\` content type.\n\nCorresponds with POST /v1/queues/{queue}/tasks:batch (the \\`CreateTasks\\` operationId).\n\n```go\nfunc (c *Client) CreateTasksWithBody(ctx context.Context, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nCreateTasksWithBody Enqueue up to 100 tasks at once\n\nEnqueues all the tasks or none: if any task is invalid, nothing is enqueued and the error names the first invalid one (\\`tasks\\[3]: ...\\`). Idempotency keys work as for a single enqueue, including between tasks in the same batch.\n\nThe whole request is limited to the payload limit plus 256 KB.\n\nTakes any type of body and a specified content type.\n\nCorresponds with POST /v1/queues/{queue}/tasks:batch (the \\`CreateTasks\\` operationId).\n\n```go\nfunc (c *Client) DeleteAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nDeleteAlertChannel Remove an alert channel\n\nCorresponds with DELETE /v1/alert-channels/{id} (the \\`DeleteAlertChannel\\` operationId).\n\n```go\nfunc (c *Client) DeleteQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nDeleteQueue Delete a queue and all its tasks\n\nWorkly's own queues, \\`\\_workflows\\` and \\`\\_callbacks\\`, can't be deleted (\\`invalid\\_state\\`): their tasks are workflow steps and callbacks in flight.\n\nCorresponds with DELETE /v1/queues/{queue} (the \\`DeleteQueue\\` operationId).\n\n```go\nfunc (c *Client) DeleteSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nDeleteSchedule Delete a schedule and all its runs\n\nA run in flight finishes, but its result isn't recorded.\n\nCorresponds with DELETE /v1/schedules/{schedule} (the \\`DeleteSchedule\\` operationId).\n\n```go\nfunc (c *Client) DeleteWorkflow(ctx context.Context, workflow WorkflowName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nDeleteWorkflow Delete a workflow\n\nDeletes the definition only. Its runs are kept (under retention), and runs still going finish under the definition they started with.\n\nCorresponds with DELETE /v1/workflows/{workflow} (the \\`DeleteWorkflow\\` operationId).\n\n```go\nfunc (c *Client) GetActivity(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetActivity Count tasks created and finished over time\n\nCounts the workspace's tasks created in each bucket of the range, per queue, and the tasks that finished in it, by final state; oldest bucket first, and every bucket is listed, empty ones too. Buckets are 5 minutes for \\`1h\\`, 1 hour for \\`24h\\` and 6 hours for \\`7d\\`, aligned to UTC. Finished tasks are deleted after the server's retention period, so buckets further back than \\`retention\\_seconds\\` only count what is left.\n\nCorresponds with GET /v1/activity (the \\`GetActivity\\` operationId).\n\n```go\nfunc (c *Client) GetGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetGroup Get a task group\n\nCorresponds with GET /v1/groups/{id} (the \\`GetGroup\\` operationId).\n\n```go\nfunc (c *Client) GetHealthz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetHealthz Liveness probe\n\nReturns 200 while the process is running. Does not touch the database.\n\nCorresponds with GET /healthz (the \\`GetHealthz\\` operationId).\n\n```go\nfunc (c *Client) GetQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetQueue Get a queue\n\nCorresponds with GET /v1/queues/{queue} (the \\`GetQueue\\` operationId).\n\n```go\nfunc (c *Client) GetQueueActivity(ctx context.Context, queue QueueName, params *GetQueueActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetQueueActivity Count a queue's finished tasks\n\nCounts the tasks that finished since \\`since\\`, by final state, with percentiles of how long their latest attempt took. Finished tasks are deleted after the server's retention period, so a \\`since\\` further back than \\`retention\\_seconds\\` only counts what is left.\n\nCorresponds with GET /v1/queues/{queue}/activity (the \\`GetQueueActivity\\` operationId).\n\n```go\nfunc (c *Client) GetQueueFailures(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetQueueFailures Group a queue's failed tasks by error\n\nGroups the queue's failed tasks by their latest error, most common first, so one broken endpoint or bad payload shows up as one line. Only the 10,000 most recently failed tasks are grouped.\n\nCorresponds with GET /v1/queues/{queue}/failures (the \\`GetQueueFailures\\` operationId).\n\n```go\nfunc (c *Client) GetReadyz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetReadyz Readiness probe\n\nReturns 200 when the database is reachable and migrations are applied.\n\nCorresponds with GET /readyz (the \\`GetReadyz\\` operationId).\n\n```go\nfunc (c *Client) GetRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetRun Get a run\n\nCorresponds with GET /v1/runs/{id} (the \\`GetRun\\` operationId).\n\n```go\nfunc (c *Client) GetRunDelivery(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetRunDelivery Get the request that delivers a run\n\nThe HTTP request Workly sends to deliver the run, as it would be sent now, with a fresh signature, as for \\`GET /v1/tasks/{id}/delivery\\`. Nothing is sent.\n\nCorresponds with GET /v1/runs/{id}/delivery (the \\`GetRunDelivery\\` operationId).\n\n```go\nfunc (c *Client) GetSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetSchedule Get a schedule\n\nCorresponds with GET /v1/schedules/{schedule} (the \\`GetSchedule\\` operationId).\n\n```go\nfunc (c *Client) GetTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetTask Get a task\n\nCorresponds with GET /v1/tasks/{id} (the \\`GetTask\\` operationId).\n\n```go\nfunc (c *Client) GetTaskDelivery(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetTaskDelivery Get the request that delivers a task\n\nThe HTTP request Workly sends to deliver the task, as it would be sent now: the task's own headers plus Workly's (\\`Workly-Task-Id\\`, \\`Workly-Signature\\`, ...), and the exact body. The signature is fresh, so replaying the request (for example with curl) while fixing an endpoint passes verification until the timestamp is too old. Nothing is sent and the task doesn't change. \\`Workly-Attempt\\` is the next attempt for a pending task, otherwise the latest.\n\nCorresponds with GET /v1/tasks/{id}/delivery (the \\`GetTaskDelivery\\` operationId).\n\n```go\nfunc (c *Client) GetWorkflow(ctx context.Context, workflow WorkflowName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetWorkflow Get a workflow\n\nCorresponds with GET /v1/workflows/{workflow} (the \\`GetWorkflow\\` operationId).\n\n```go\nfunc (c *Client) GetWorkflowRun(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nGetWorkflowRun Get a workflow run with its steps\n\nCorresponds with GET /v1/workflow-runs/{id} (the \\`GetWorkflowRun\\` operationId).\n\n```go\nfunc (c *Client) ListAlertChannels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListAlertChannels List alert channels\n\nWhere the workspace's alerts go. When tasks in a queue or runs of a schedule fail (after their last attempt), every channel gets an alert within about a minute, naming the errors. After that, a queue or schedule gets at most one alert every 30 minutes, covering the failures since its previous one.\n\nCorresponds with GET /v1/alert-channels (the \\`ListAlertChannels\\` operationId).\n\n```go\nfunc (c *Client) ListAttempts(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListAttempts List a task's delivery attempts, oldest first\n\nCorresponds with GET /v1/tasks/{id}/attempts (the \\`ListAttempts\\` operationId).\n\n```go\nfunc (c *Client) ListGroups(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListGroups List task groups\n\nNewest first. List a group's tasks with \\`GET /v1/tasks?group\\_id=\\`.\n\nCorresponds with GET /v1/groups (the \\`ListGroups\\` operationId).\n\n```go\nfunc (c *Client) ListQueues(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListQueues List queues\n\nCorresponds with GET /v1/queues (the \\`ListQueues\\` operationId).\n\n```go\nfunc (c *Client) ListRunAttempts(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListRunAttempts List a run's delivery attempts, oldest first\n\nCorresponds with GET /v1/runs/{id}/attempts (the \\`ListRunAttempts\\` operationId).\n\n```go\nfunc (c *Client) ListRuns(ctx context.Context, params *ListRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListRuns List runs, newest first\n\nRuns of every schedule, or of one with \\`schedule\\`. A \\`schedule\\` that doesn't exist is \\`schedule\\_not\\_found\\`.\n\nCorresponds with GET /v1/runs (the \\`ListRuns\\` operationId).\n\n```go\nfunc (c *Client) ListSchedules(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListSchedules List schedules\n\nCorresponds with GET /v1/schedules (the \\`ListSchedules\\` operationId).\n\n```go\nfunc (c *Client) ListTasks(ctx context.Context, queue QueueName, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListTasks List a queue's tasks\n\nNewest first, unless \\`sort\\` and \\`order\\` say otherwise.\n\nCorresponds with GET /v1/queues/{queue}/tasks (the \\`ListTasks\\` operationId).\n\n```go\nfunc (c *Client) ListWorkflowRuns(ctx context.Context, params *ListWorkflowRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListWorkflowRuns List workflow runs, newest first\n\nRuns of every workflow, or of one with \\`workflow\\` (including a deleted one's).\n\nCorresponds with GET /v1/workflow-runs (the \\`ListWorkflowRuns\\` operationId).\n\n```go\nfunc (c *Client) ListWorkflows(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nListWorkflows List workflows\n\nCorresponds with GET /v1/workflows (the \\`ListWorkflows\\` operationId).\n\n```go\nfunc (c *Client) PauseQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nPauseQueue Pause a queue\n\nStops dispatching the queue's tasks. Deliveries already in flight finish, and tasks can still be enqueued.\n\nCorresponds with POST /v1/queues/{queue}/pause (the \\`PauseQueue\\` operationId).\n\n```go\nfunc (c *Client) PauseSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nPauseSchedule Pause a schedule\n\nStops the schedule from firing. Runs already pending or in flight still finish, and \"run now\" still works.\n\nCorresponds with POST /v1/schedules/{schedule}/pause (the \\`PauseSchedule\\` operationId).\n\n```go\nfunc (c *Client) PreviewCron(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nPreviewCron Preview a cron timetable\n\nThe next times a schedule with this cron expression and timezone would run, from now, without creating it. For forms that check a timetable as it's typed.\n\nWith \\`from\\` and \\`until\\`, it also lists every run in that window (at most 35 days) as \\`spans\\`, for calendars of what runs when.\n\nCorresponds with GET /v1/cron/preview (the \\`PreviewCron\\` operationId).\n\n```go\nfunc (c *Client) PutQueue(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nPutQueue Create or update a queue\n\nDeclarative and idempotent: the queue ends up with exactly the given configuration, and omitted fields are reset to their defaults. This makes queue configuration easy to keep in code. It doesn't change whether the queue is paused.\n\nTakes a body of the \\`application/json\\` content type.\n\nCorresponds with PUT /v1/queues/{queue} (the \\`PutQueue\\` operationId).\n\n```go\nfunc (c *Client) PutQueueWithBody(ctx context.Context, queue QueueName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nPutQueueWithBody Create or update a queue\n\nDeclarative and idempotent: the queue ends up with exactly the given configuration, and omitted fields are reset to their defaults. This makes queue configuration easy to keep in code. It doesn't change whether the queue is paused.\n\nTakes any type of body and a specified content type.\n\nCorresponds with PUT /v1/queues/{queue} (the \\`PutQueue\\` operationId).\n\n```go\nfunc (c *Client) PutSchedule(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nPutSchedule Create or update a schedule\n\nDeclarative and idempotent: the schedule ends up with exactly the given settings, and omitted fields are reset to their defaults. It doesn't change whether the schedule is paused. The response's \\`next\\_runs\\` shows when it will run, so a cron expression can be checked before relying on it.\n\nRuns already created keep the request they were created with; retries use the schedule's current retry policy and timeout.\n\nTakes a body of the \\`application/json\\` content type.\n\nCorresponds with PUT /v1/schedules/{schedule} (the \\`PutSchedule\\` operationId).\n\n```go\nfunc (c *Client) PutScheduleWithBody(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nPutScheduleWithBody Create or update a schedule\n\nDeclarative and idempotent: the schedule ends up with exactly the given settings, and omitted fields are reset to their defaults. It doesn't change whether the schedule is paused. The response's \\`next\\_runs\\` shows when it will run, so a cron expression can be checked before relying on it.\n\nRuns already created keep the request they were created with; retries use the schedule's current retry policy and timeout.\n\nTakes any type of body and a specified content type.\n\nCorresponds with PUT /v1/schedules/{schedule} (the \\`PutSchedule\\` operationId).\n\n```go\nfunc (c *Client) PutWorkflow(ctx context.Context, workflow WorkflowName, body PutWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nPutWorkflow Create or update a workflow\n\nDeclarative and idempotent: the workflow ends up with exactly the given steps and settings. A changed definition gets a new \\`version\\`. Runs already started keep the definition they started with; new runs use this one.\n\nTakes a body of the \\`application/json\\` content type.\n\nCorresponds with PUT /v1/workflows/{workflow} (the \\`PutWorkflow\\` operationId).\n\n```go\nfunc (c *Client) PutWorkflowWithBody(ctx context.Context, workflow WorkflowName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nPutWorkflowWithBody Create or update a workflow\n\nDeclarative and idempotent: the workflow ends up with exactly the given steps and settings. A changed definition gets a new \\`version\\`. Runs already started keep the definition they started with; new runs use this one.\n\nTakes any type of body and a specified content type.\n\nCorresponds with PUT /v1/workflows/{workflow} (the \\`PutWorkflow\\` operationId).\n\n```go\nfunc (c *Client) ResumeQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nResumeQueue Resume a paused queue\n\nCorresponds with POST /v1/queues/{queue}/resume (the \\`ResumeQueue\\` operationId).\n\n```go\nfunc (c *Client) ResumeSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nResumeSchedule Resume a paused schedule\n\nThe schedule fires again from its next slot after now. Slots that passed while it was paused are not run.\n\nCorresponds with POST /v1/schedules/{schedule}/resume (the \\`ResumeSchedule\\` operationId).\n\n```go\nfunc (c *Client) RetryFailedTasks(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nRetryFailedTasks Retry every failed task in a queue\n\nReplays every failed task in the queue now, each with a fresh set of \\`max\\_attempts\\`, as \\`POST /v1/tasks/{id}/retry\\` does for one task. Use it to recover after an outage of the endpoint. Pause the queue first or set a rate limit to control how fast the replays are delivered.\n\nWith \\`last\\_error\\`, only the failed tasks whose latest error is exactly that (as \\`GET /v1/queues/{queue}/failures\\` groups them) are retried.\n\nCorresponds with POST /v1/queues/{queue}/retry-failed (the \\`RetryFailedTasks\\` operationId).\n\n```go\nfunc (c *Client) RetryRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nRetryRun Retry a run now\n\nMakes the run due now. A succeeded, failed, cancelled or skipped run is delivered again with a fresh set of \\`max\\_attempts\\`; a pending run just runs sooner. A run can't be retried while an attempt is in flight (\\`invalid\\_state\\`).\n\nCorresponds with POST /v1/runs/{id}/retry (the \\`RetryRun\\` operationId).\n\n```go\nfunc (c *Client) RetryTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nRetryTask Retry a task now\n\nMakes the task due now. A succeeded, failed or cancelled task is replayed with a fresh set of \\`max\\_attempts\\`; its attempt numbers keep counting. A pending task (scheduled or waiting to retry) just runs sooner. A task can't be retried while an attempt is in flight (\\`invalid\\_state\\`).\n\nCorresponds with POST /v1/tasks/{id}/retry (the \\`RetryTask\\` operationId).\n\n```go\nfunc (c *Client) RetryWorkflowRun(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nRetryWorkflowRun Retry a workflow run\n\nReopens a failed or cancelled run, under the definition it started with and with the same input: steps that succeeded stay, and the rest run again. Each step that runs again gets its task back, pending with a fresh set of attempts. A step that was waiting for a group follows the group: it succeeds if the group has since succeeded, and waits for it again if it is still going. The run's \\`attempt\\` goes up by one, and its \\`max\\_duration\\_seconds\\` starts over. Other runs are \\`invalid\\_state\\`.\n\nCorresponds with POST /v1/workflow-runs/{id}/retry (the \\`RetryWorkflowRun\\` operationId).\n\n```go\nfunc (c *Client) SearchTasks(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nSearchTasks Search tasks across queues\n\nAll filters are optional and combine with AND. To find one task by ID, use \\`GET /v1/tasks/{id}\\`. Newest first, unless \\`sort\\` and \\`order\\` say otherwise.\n\nCorresponds with GET /v1/tasks (the \\`SearchTasks\\` operationId).\n\n```go\nfunc (c *Client) StartWorkflowRun(ctx context.Context, workflow WorkflowName, body StartWorkflowRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nStartWorkflowRun Start a workflow run\n\nStarts a run and enqueues the steps without dependencies. With an \\`idempotency\\_key\\` already used for a run of this workflow, that run is returned (200) and nothing starts.\n\nTakes a body of the \\`application/json\\` content type.\n\nCorresponds with POST /v1/workflows/{workflow}/runs (the \\`StartWorkflowRun\\` operationId).\n\n```go\nfunc (c *Client) StartWorkflowRunWithBody(ctx context.Context, workflow WorkflowName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nStartWorkflowRunWithBody Start a workflow run\n\nStarts a run and enqueues the steps without dependencies. With an \\`idempotency\\_key\\` already used for a run of this workflow, that run is returned (200) and nothing starts.\n\nTakes any type of body and a specified content type.\n\nCorresponds with POST /v1/workflows/{workflow}/runs (the \\`StartWorkflowRun\\` operationId).\n\n```go\nfunc (c *Client) TestAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nTestAlertChannel Send a test alert\n\nSends a test message to the channel now, to check it's set up right. If it can't be sent, the error (\\`alert\\_failed\\`, 502) says why.\n\nCorresponds with POST /v1/alert-channels/{id}/test (the \\`TestAlertChannel\\` operationId).\n\n```go\nfunc (c *Client) TriggerSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\nTriggerSchedule Run a schedule now\n\nCreates a run that is delivered right away, with \\`trigger: manual\\`. It runs even if the schedule is paused or a run is in flight, and doesn't change when the schedule next fires.\n\nCorresponds with POST /v1/schedules/{schedule}/trigger (the \\`TriggerSchedule\\` operationId).\n\n```go\ntype ClientInterface interface {\n\n\t// GetHealthz Liveness probe\n\t//\n\t// Returns 200 while the process is running. Does not touch the database.\n\t//\n\t// Corresponds with GET /healthz (the `GetHealthz` operationId).\n\tGetHealthz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetReadyz Readiness probe\n\t//\n\t// Returns 200 when the database is reachable and migrations are applied.\n\t//\n\t// Corresponds with GET /readyz (the `GetReadyz` operationId).\n\tGetReadyz(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetActivity Count tasks created and finished over time\n\t//\n\t// Counts the workspace's tasks created in each bucket of the range, per\n\t// queue, and the tasks that finished in it, by final state; oldest\n\t// bucket first, and every bucket is listed, empty ones too.\n\t// Buckets are 5 minutes for `1h`, 1 hour for `24h` and 6 hours for `7d`,\n\t// aligned to UTC. Finished tasks are deleted after the server's\n\t// retention period, so buckets further back than `retention_seconds`\n\t// only count what is left.\n\t//\n\t// Corresponds with GET /v1/activity (the `GetActivity` operationId).\n\tGetActivity(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListAlertChannels List alert channels\n\t//\n\t// Where the workspace's alerts go. When tasks in a queue or runs of a\n\t// schedule fail (after their last attempt), every channel gets an\n\t// alert within about a minute, naming the errors. After that, a queue\n\t// or schedule gets at most one alert every 30 minutes, covering the\n\t// failures since its previous one.\n\t//\n\t// Corresponds with GET /v1/alert-channels (the `ListAlertChannels` operationId).\n\tListAlertChannels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CreateAlertChannelWithBody Add an alert channel\n\t//\n\t// A workspace has at most 10 channels. Email channels need a server\n\t// that can send email (`email_enabled` in the list); a Slack channel\n\t// takes an incoming webhook URL (`https://hooks.slack.com/...`).\n\t//\n\t// Takes any type of body and a specified content type.\n\t//\n\t// Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).\n\tCreateAlertChannelWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CreateAlertChannel Add an alert channel\n\t//\n\t// A workspace has at most 10 channels. Email channels need a server\n\t// that can send email (`email_enabled` in the list); a Slack channel\n\t// takes an incoming webhook URL (`https://hooks.slack.com/...`).\n\t//\n\t// Takes a body of the `application/json` content type.\n\t//\n\t// Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).\n\tCreateAlertChannel(ctx context.Context, body CreateAlertChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// DeleteAlertChannel Remove an alert channel\n\t//\n\t// Corresponds with DELETE /v1/alert-channels/{id} (the `DeleteAlertChannel` operationId).\n\tDeleteAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// TestAlertChannel Send a test alert\n\t//\n\t// Sends a test message to the channel now, to check it's set up\n\t// right. If it can't be sent, the error (`alert_failed`, 502) says\n\t// why.\n\t//\n\t// Corresponds with POST /v1/alert-channels/{id}/test (the `TestAlertChannel` operationId).\n\tTestAlertChannel(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PreviewCron Preview a cron timetable\n\t//\n\t// The next times a schedule with this cron expression and timezone\n\t// would run, from now, without creating it. For forms that check a\n\t// timetable as it's typed.\n\t//\n\t// With `from` and `until`, it also lists every run in that window\n\t// (at most 35 days) as `spans`, for calendars of what runs when.\n\t//\n\t// Corresponds with GET /v1/cron/preview (the `PreviewCron` operationId).\n\tPreviewCron(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListGroups List task groups\n\t//\n\t// Newest first. List a group's tasks with `GET /v1/tasks?group_id=`.\n\t//\n\t// Corresponds with GET /v1/groups (the `ListGroups` operationId).\n\tListGroups(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CreateGroupWithBody Create a task group\n\t//\n\t// Creates an open group. Enqueue tasks into it with `group_id`, then\n\t// close it with `POST /v1/groups/{id}/close`. Once it is closed and\n\t// every task in it has succeeded, failed or been cancelled, it\n\t// completes and enqueues its `on_complete` callback, once.\n\t//\n\t// If `idempotency_key` matches an existing group, that group is\n\t// returned with status 200 and nothing is created.\n\t//\n\t// Takes any type of body and a specified content type.\n\t//\n\t// Corresponds with POST /v1/groups (the `CreateGroup` operationId).\n\tCreateGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CreateGroup Create a task group\n\t//\n\t// Creates an open group. Enqueue tasks into it with `group_id`, then\n\t// close it with `POST /v1/groups/{id}/close`. Once it is closed and\n\t// every task in it has succeeded, failed or been cancelled, it\n\t// completes and enqueues its `on_complete` callback, once.\n\t//\n\t// If `idempotency_key` matches an existing group, that group is\n\t// returned with status 200 and nothing is created.\n\t//\n\t// Takes a body of the `application/json` content type.\n\t//\n\t// Corresponds with POST /v1/groups (the `CreateGroup` operationId).\n\tCreateGroup(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetGroup Get a task group\n\t//\n\t// Corresponds with GET /v1/groups/{id} (the `GetGroup` operationId).\n\tGetGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CloseGroup Close a task group\n\t//\n\t// Stops the group from accepting tasks; enqueueing into it then fails\n\t// with `group_closed`. If its tasks have all finished (or it has none),\n\t// it completes at once. Closing a closed group does nothing.\n\t//\n\t// Corresponds with POST /v1/groups/{id}/close (the `CloseGroup` operationId).\n\tCloseGroup(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListQueues List queues\n\t//\n\t// Corresponds with GET /v1/queues (the `ListQueues` operationId).\n\tListQueues(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// DeleteQueue Delete a queue and all its tasks\n\t//\n\t// Workly's own queues, `_workflows` and `_callbacks`, can't be deleted\n\t// (`invalid_state`): their tasks are workflow steps and callbacks in\n\t// flight.\n\t//\n\t// Corresponds with DELETE /v1/queues/{queue} (the `DeleteQueue` operationId).\n\tDeleteQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetQueue Get a queue\n\t//\n\t// Corresponds with GET /v1/queues/{queue} (the `GetQueue` operationId).\n\tGetQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PutQueueWithBody Create or update a queue\n\t//\n\t// Declarative and idempotent: the queue ends up with exactly the given\n\t// configuration, and omitted fields are reset to their defaults. This\n\t// makes queue configuration easy to keep in code. It doesn't change\n\t// whether the queue is paused.\n\t//\n\t// Takes any type of body and a specified content type.\n\t//\n\t// Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).\n\tPutQueueWithBody(ctx context.Context, queue QueueName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PutQueue Create or update a queue\n\t//\n\t// Declarative and idempotent: the queue ends up with exactly the given\n\t// configuration, and omitted fields are reset to their defaults. This\n\t// makes queue configuration easy to keep in code. It doesn't change\n\t// whether the queue is paused.\n\t//\n\t// Takes a body of the `application/json` content type.\n\t//\n\t// Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).\n\tPutQueue(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetQueueActivity Count a queue's finished tasks\n\t//\n\t// Counts the tasks that finished since `since`, by final state, with\n\t// percentiles of how long their latest attempt took. Finished\n\t// tasks are deleted after the server's retention period, so a `since`\n\t// further back than `retention_seconds` only counts what is left.\n\t//\n\t// Corresponds with GET /v1/queues/{queue}/activity (the `GetQueueActivity` operationId).\n\tGetQueueActivity(ctx context.Context, queue QueueName, params *GetQueueActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CancelPendingTasks Cancel a queue's pending tasks\n\t//\n\t// Cancels every pending task, including scheduled ones and ones waiting\n\t// to retry, as `POST /v1/tasks/{id}/cancel` does for one task. Running\n\t// tasks finish their attempt. Cancelled tasks stay in the history until\n\t// retention removes them, and can be retried.\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/cancel-pending (the `CancelPendingTasks` operationId).\n\tCancelPendingTasks(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetQueueFailures Group a queue's failed tasks by error\n\t//\n\t// Groups the queue's failed tasks by their latest error, most common\n\t// first, so one broken endpoint or bad payload shows up as one line.\n\t// Only the 10,000 most recently failed tasks are grouped.\n\t//\n\t// Corresponds with GET /v1/queues/{queue}/failures (the `GetQueueFailures` operationId).\n\tGetQueueFailures(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PauseQueue Pause a queue\n\t//\n\t// Stops dispatching the queue's tasks. Deliveries already in flight\n\t// finish, and tasks can still be enqueued.\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/pause (the `PauseQueue` operationId).\n\tPauseQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ResumeQueue Resume a paused queue\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/resume (the `ResumeQueue` operationId).\n\tResumeQueue(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// RetryFailedTasks Retry every failed task in a queue\n\t//\n\t// Replays every failed task in the queue now, each with a fresh set of\n\t// `max_attempts`, as `POST /v1/tasks/{id}/retry` does for one task. Use\n\t// it to recover after an outage of the endpoint. Pause the queue first\n\t// or set a rate limit to control how fast the replays are delivered.\n\t//\n\t// With `last_error`, only the failed tasks whose latest error is exactly\n\t// that (as `GET /v1/queues/{queue}/failures` groups them) are retried.\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/retry-failed (the `RetryFailedTasks` operationId).\n\tRetryFailedTasks(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListTasks List a queue's tasks\n\t//\n\t// Newest first, unless `sort` and `order` say otherwise.\n\t//\n\t// Corresponds with GET /v1/queues/{queue}/tasks (the `ListTasks` operationId).\n\tListTasks(ctx context.Context, queue QueueName, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CreateTaskWithBody Enqueue a task\n\t//\n\t// The queue is created with default settings if it doesn't exist, unless\n\t// the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.\n\t//\n\t// If `idempotency_key` matches an existing task in the queue, that task\n\t// is returned with status 200 and nothing is enqueued.\n\t//\n\t// Takes any type of body and a specified content type.\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).\n\tCreateTaskWithBody(ctx context.Context, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CreateTask Enqueue a task\n\t//\n\t// The queue is created with default settings if it doesn't exist, unless\n\t// the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.\n\t//\n\t// If `idempotency_key` matches an existing task in the queue, that task\n\t// is returned with status 200 and nothing is enqueued.\n\t//\n\t// Takes a body of the `application/json` content type.\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).\n\tCreateTask(ctx context.Context, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CreateTasksWithBody Enqueue up to 100 tasks at once\n\t//\n\t// Enqueues all the tasks or none: if any task is invalid, nothing is\n\t// enqueued and the error names the first invalid one (`tasks[3]: ...`).\n\t// Idempotency keys work as for a single enqueue, including between\n\t// tasks in the same batch.\n\t//\n\t// The whole request is limited to the payload limit plus 256 KB.\n\t//\n\t// Takes any type of body and a specified content type.\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).\n\tCreateTasksWithBody(ctx context.Context, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CreateTasks Enqueue up to 100 tasks at once\n\t//\n\t// Enqueues all the tasks or none: if any task is invalid, nothing is\n\t// enqueued and the error names the first invalid one (`tasks[3]: ...`).\n\t// Idempotency keys work as for a single enqueue, including between\n\t// tasks in the same batch.\n\t//\n\t// The whole request is limited to the payload limit plus 256 KB.\n\t//\n\t// Takes a body of the `application/json` content type.\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).\n\tCreateTasks(ctx context.Context, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListRuns List runs, newest first\n\t//\n\t// Runs of every schedule, or of one with `schedule`. A `schedule` that\n\t// doesn't exist is `schedule_not_found`.\n\t//\n\t// Corresponds with GET /v1/runs (the `ListRuns` operationId).\n\tListRuns(ctx context.Context, params *ListRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetRun Get a run\n\t//\n\t// Corresponds with GET /v1/runs/{id} (the `GetRun` operationId).\n\tGetRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListRunAttempts List a run's delivery attempts, oldest first\n\t//\n\t// Corresponds with GET /v1/runs/{id}/attempts (the `ListRunAttempts` operationId).\n\tListRunAttempts(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CancelRun Cancel a run\n\t//\n\t// Cancels a pending or running run. A running run's current attempt\n\t// finishes and is recorded, but the run isn't retried. Cancelling a\n\t// cancelled run does nothing; a finished or skipped run can't be\n\t// cancelled (`invalid_state`).\n\t//\n\t// Corresponds with POST /v1/runs/{id}/cancel (the `CancelRun` operationId).\n\tCancelRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetRunDelivery Get the request that delivers a run\n\t//\n\t// The HTTP request Workly sends to deliver the run, as it would be sent\n\t// now, with a fresh signature, as for `GET /v1/tasks/{id}/delivery`.\n\t// Nothing is sent.\n\t//\n\t// Corresponds with GET /v1/runs/{id}/delivery (the `GetRunDelivery` operationId).\n\tGetRunDelivery(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// RetryRun Retry a run now\n\t//\n\t// Makes the run due now. A succeeded, failed, cancelled or skipped run\n\t// is delivered again with a fresh set of `max_attempts`; a pending run\n\t// just runs sooner. A run can't be retried while an attempt is in\n\t// flight (`invalid_state`).\n\t//\n\t// Corresponds with POST /v1/runs/{id}/retry (the `RetryRun` operationId).\n\tRetryRun(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListSchedules List schedules\n\t//\n\t// Corresponds with GET /v1/schedules (the `ListSchedules` operationId).\n\tListSchedules(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// DeleteSchedule Delete a schedule and all its runs\n\t//\n\t// A run in flight finishes, but its result isn't recorded.\n\t//\n\t// Corresponds with DELETE /v1/schedules/{schedule} (the `DeleteSchedule` operationId).\n\tDeleteSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetSchedule Get a schedule\n\t//\n\t// Corresponds with GET /v1/schedules/{schedule} (the `GetSchedule` operationId).\n\tGetSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PutScheduleWithBody Create or update a schedule\n\t//\n\t// Declarative and idempotent: the schedule ends up with exactly the\n\t// given settings, and omitted fields are reset to their defaults. It\n\t// doesn't change whether the schedule is paused. The response's\n\t// `next_runs` shows when it will run, so a cron expression can be\n\t// checked before relying on it.\n\t//\n\t// Runs already created keep the request they were created with; retries\n\t// use the schedule's current retry policy and timeout.\n\t//\n\t// Takes any type of body and a specified content type.\n\t//\n\t// Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).\n\tPutScheduleWithBody(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PutSchedule Create or update a schedule\n\t//\n\t// Declarative and idempotent: the schedule ends up with exactly the\n\t// given settings, and omitted fields are reset to their defaults. It\n\t// doesn't change whether the schedule is paused. The response's\n\t// `next_runs` shows when it will run, so a cron expression can be\n\t// checked before relying on it.\n\t//\n\t// Runs already created keep the request they were created with; retries\n\t// use the schedule's current retry policy and timeout.\n\t//\n\t// Takes a body of the `application/json` content type.\n\t//\n\t// Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).\n\tPutSchedule(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PauseSchedule Pause a schedule\n\t//\n\t// Stops the schedule from firing. Runs already pending or in flight\n\t// still finish, and \"run now\" still works.\n\t//\n\t// Corresponds with POST /v1/schedules/{schedule}/pause (the `PauseSchedule` operationId).\n\tPauseSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ResumeSchedule Resume a paused schedule\n\t//\n\t// The schedule fires again from its next slot after now. Slots that\n\t// passed while it was paused are not run.\n\t//\n\t// Corresponds with POST /v1/schedules/{schedule}/resume (the `ResumeSchedule` operationId).\n\tResumeSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// TriggerSchedule Run a schedule now\n\t//\n\t// Creates a run that is delivered right away, with `trigger: manual`.\n\t// It runs even if the schedule is paused or a run is in flight, and\n\t// doesn't change when the schedule next fires.\n\t//\n\t// Corresponds with POST /v1/schedules/{schedule}/trigger (the `TriggerSchedule` operationId).\n\tTriggerSchedule(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// SearchTasks Search tasks across queues\n\t//\n\t// All filters are optional and combine with AND. To find one task by\n\t// ID, use `GET /v1/tasks/{id}`. Newest first, unless `sort` and\n\t// `order` say otherwise.\n\t//\n\t// Corresponds with GET /v1/tasks (the `SearchTasks` operationId).\n\tSearchTasks(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetTask Get a task\n\t//\n\t// Corresponds with GET /v1/tasks/{id} (the `GetTask` operationId).\n\tGetTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListAttempts List a task's delivery attempts, oldest first\n\t//\n\t// Corresponds with GET /v1/tasks/{id}/attempts (the `ListAttempts` operationId).\n\tListAttempts(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CancelTask Cancel a task\n\t//\n\t// Cancels a pending or running task. A running task's current attempt\n\t// finishes and is recorded, but the task isn't retried. Cancelling a\n\t// cancelled task does nothing; a succeeded or failed task can't be\n\t// cancelled (`invalid_state`).\n\t//\n\t// Corresponds with POST /v1/tasks/{id}/cancel (the `CancelTask` operationId).\n\tCancelTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetTaskDelivery Get the request that delivers a task\n\t//\n\t// The HTTP request Workly sends to deliver the task, as it would be sent\n\t// now: the task's own headers plus Workly's (`Workly-Task-Id`,\n\t// `Workly-Signature`, ...), and the exact body. The signature is fresh,\n\t// so replaying the request (for example with curl) while fixing an\n\t// endpoint passes verification until the timestamp is too old. Nothing\n\t// is sent and the task doesn't change. `Workly-Attempt` is the next\n\t// attempt for a pending task, otherwise the latest.\n\t//\n\t// Corresponds with GET /v1/tasks/{id}/delivery (the `GetTaskDelivery` operationId).\n\tGetTaskDelivery(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// RetryTask Retry a task now\n\t//\n\t// Makes the task due now. A succeeded, failed or cancelled task is\n\t// replayed with a fresh set of `max_attempts`; its attempt numbers keep\n\t// counting. A pending task (scheduled or waiting to retry) just runs\n\t// sooner. A task can't be retried while an attempt is in flight\n\t// (`invalid_state`).\n\t//\n\t// Corresponds with POST /v1/tasks/{id}/retry (the `RetryTask` operationId).\n\tRetryTask(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListWorkflowRuns List workflow runs, newest first\n\t//\n\t// Runs of every workflow, or of one with `workflow` (including a\n\t// deleted one's).\n\t//\n\t// Corresponds with GET /v1/workflow-runs (the `ListWorkflowRuns` operationId).\n\tListWorkflowRuns(ctx context.Context, params *ListWorkflowRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetWorkflowRun Get a workflow run with its steps\n\t//\n\t// Corresponds with GET /v1/workflow-runs/{id} (the `GetWorkflowRun` operationId).\n\tGetWorkflowRun(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// CancelWorkflowRun Cancel a workflow run\n\t//\n\t// Steps that haven't started are skipped, and their pending tasks\n\t// cancelled. Requests already being delivered finish and are recorded,\n\t// but start nothing. Cancelling a cancelled run is a no-op; other\n\t// finished runs are `invalid_state`.\n\t//\n\t// Corresponds with POST /v1/workflow-runs/{id}/cancel (the `CancelWorkflowRun` operationId).\n\tCancelWorkflowRun(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// RetryWorkflowRun Retry a workflow run\n\t//\n\t// Reopens a failed or cancelled run, under the definition it started\n\t// with and with the same input: steps that succeeded stay, and the\n\t// rest run again. Each step that runs again gets its task back,\n\t// pending with a fresh set of attempts. A step that was waiting for a\n\t// group follows the group: it succeeds if the group has since\n\t// succeeded, and waits for it again if it is still going. The run's\n\t// `attempt` goes up by one, and its `max_duration_seconds` starts\n\t// over. Other runs are `invalid_state`.\n\t//\n\t// Corresponds with POST /v1/workflow-runs/{id}/retry (the `RetryWorkflowRun` operationId).\n\tRetryWorkflowRun(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// ListWorkflows List workflows\n\t//\n\t// Corresponds with GET /v1/workflows (the `ListWorkflows` operationId).\n\tListWorkflows(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// DeleteWorkflow Delete a workflow\n\t//\n\t// Deletes the definition only. Its runs are kept (under retention), and\n\t// runs still going finish under the definition they started with.\n\t//\n\t// Corresponds with DELETE /v1/workflows/{workflow} (the `DeleteWorkflow` operationId).\n\tDeleteWorkflow(ctx context.Context, workflow WorkflowName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetWorkflow Get a workflow\n\t//\n\t// Corresponds with GET /v1/workflows/{workflow} (the `GetWorkflow` operationId).\n\tGetWorkflow(ctx context.Context, workflow WorkflowName, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PutWorkflowWithBody Create or update a workflow\n\t//\n\t// Declarative and idempotent: the workflow ends up with exactly the\n\t// given steps and settings. A changed definition gets a new `version`.\n\t// Runs already started keep the definition they started with; new runs\n\t// use this one.\n\t//\n\t// Takes any type of body and a specified content type.\n\t//\n\t// Corresponds with PUT /v1/workflows/{workflow} (the `PutWorkflow` operationId).\n\tPutWorkflowWithBody(ctx context.Context, workflow WorkflowName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PutWorkflow Create or update a workflow\n\t//\n\t// Declarative and idempotent: the workflow ends up with exactly the\n\t// given steps and settings. A changed definition gets a new `version`.\n\t// Runs already started keep the definition they started with; new runs\n\t// use this one.\n\t//\n\t// Takes a body of the `application/json` content type.\n\t//\n\t// Corresponds with PUT /v1/workflows/{workflow} (the `PutWorkflow` operationId).\n\tPutWorkflow(ctx context.Context, workflow WorkflowName, body PutWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// StartWorkflowRunWithBody Start a workflow run\n\t//\n\t// Starts a run and enqueues the steps without dependencies. With an\n\t// `idempotency_key` already used for a run of this workflow, that run\n\t// is returned (200) and nothing starts.\n\t//\n\t// Takes any type of body and a specified content type.\n\t//\n\t// Corresponds with POST /v1/workflows/{workflow}/runs (the `StartWorkflowRun` operationId).\n\tStartWorkflowRunWithBody(ctx context.Context, workflow WorkflowName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// StartWorkflowRun Start a workflow run\n\t//\n\t// Starts a run and enqueues the steps without dependencies. With an\n\t// `idempotency_key` already used for a run of this workflow, that run\n\t// is returned (200) and nothing starts.\n\t//\n\t// Takes a body of the `application/json` content type.\n\t//\n\t// Corresponds with POST /v1/workflows/{workflow}/runs (the `StartWorkflowRun` operationId).\n\tStartWorkflowRun(ctx context.Context, workflow WorkflowName, body StartWorkflowRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n}\n```\nThe interface specification for the client above.\n\n```go\ntype ClientOption func(*Client) error\n```\nClientOption allows setting custom parameters during construction\n\n```go\nfunc WithBaseURL(baseURL string) ClientOption\n```\nWithBaseURL overrides the baseURL.\n\n```go\nfunc WithHTTPClient(doer HttpRequestDoer) ClientOption\n```\nWithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.\n\n```go\nfunc WithRequestEditorFn(fn RequestEditorFn) ClientOption\n```\nWithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.\n\n```go\ntype ClientWithResponses struct {\n\tClientInterface\n}\n```\nClientWithResponses builds on ClientInterface to offer response payloads\n\n```go\nfunc NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)\n```\nNewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling\n\n```go\nfunc (c *ClientWithResponses) CancelPendingTasksWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*CancelPendingTasksResponse, error)\n```\nCancelPendingTasksWithResponse Cancel a queue's pending tasks\n\nCancels every pending task, including scheduled ones and ones waiting to retry, as \\`POST /v1/tasks/{id}/cancel\\` does for one task. Running tasks finish their attempt. Cancelled tasks stay in the history until retention removes them, and can be retried.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/queues/{queue}/cancel-pending (the \\`CancelPendingTasks\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CancelRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*CancelRunResponse, error)\n```\nCancelRunWithResponse Cancel a run\n\nCancels a pending or running run. A running run's current attempt finishes and is recorded, but the run isn't retried. Cancelling a cancelled run does nothing; a finished or skipped run can't be cancelled (\\`invalid\\_state\\`).\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/runs/{id}/cancel (the \\`CancelRun\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CancelTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*CancelTaskResponse, error)\n```\nCancelTaskWithResponse Cancel a task\n\nCancels a pending or running task. A running task's current attempt finishes and is recorded, but the task isn't retried. Cancelling a cancelled task does nothing; a succeeded or failed task can't be cancelled (\\`invalid\\_state\\`).\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/tasks/{id}/cancel (the \\`CancelTask\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CancelWorkflowRunWithResponse(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*CancelWorkflowRunResponse, error)\n```\nCancelWorkflowRunWithResponse Cancel a workflow run\n\nSteps that haven't started are skipped, and their pending tasks cancelled. Requests already being delivered finish and are recorded, but start nothing. Cancelling a cancelled run is a no-op; other finished runs are \\`invalid\\_state\\`.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/workflow-runs/{id}/cancel (the \\`CancelWorkflowRun\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CloseGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*CloseGroupResponse, error)\n```\nCloseGroupWithResponse Close a task group\n\nStops the group from accepting tasks; enqueueing into it then fails with \\`group\\_closed\\`. If its tasks have all finished (or it has none), it completes at once. Closing a closed group does nothing.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/groups/{id}/close (the \\`CloseGroup\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CreateAlertChannelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertChannelResponse, error)\n```\nCreateAlertChannelWithBodyWithResponse Add an alert channel\n\nA workspace has at most 10 channels. Email channels need a server that can send email (\\`email\\_enabled\\` in the list); a Slack channel takes an incoming webhook URL (\\`[https://hooks.slack.com/](https://hooks.slack.com/)...\\`).\n\nTakes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/alert-channels (the \\`CreateAlertChannel\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CreateAlertChannelWithResponse(ctx context.Context, body CreateAlertChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertChannelResponse, error)\n```\nCreateAlertChannelWithResponse Add an alert channel\n\nA workspace has at most 10 channels. Email channels need a server that can send email (\\`email\\_enabled\\` in the list); a Slack channel takes an incoming webhook URL (\\`[https://hooks.slack.com/](https://hooks.slack.com/)...\\`).\n\nTakes a body of the \\`application/json\\` content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/alert-channels (the \\`CreateAlertChannel\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CreateGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)\n```\nCreateGroupWithBodyWithResponse Create a task group\n\nCreates an open group. Enqueue tasks into it with \\`group\\_id\\`, then close it with \\`POST /v1/groups/{id}/close\\`. Once it is closed and every task in it has succeeded, failed or been cancelled, it completes and enqueues its \\`on\\_complete\\` callback, once.\n\nIf \\`idempotency\\_key\\` matches an existing group, that group is returned with status 200 and nothing is created.\n\nTakes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/groups (the \\`CreateGroup\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CreateGroupWithResponse(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)\n```\nCreateGroupWithResponse Create a task group\n\nCreates an open group. Enqueue tasks into it with \\`group\\_id\\`, then close it with \\`POST /v1/groups/{id}/close\\`. Once it is closed and every task in it has succeeded, failed or been cancelled, it completes and enqueues its \\`on\\_complete\\` callback, once.\n\nIf \\`idempotency\\_key\\` matches an existing group, that group is returned with status 200 and nothing is created.\n\nTakes a body of the \\`application/json\\` content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/groups (the \\`CreateGroup\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CreateTaskWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)\n```\nCreateTaskWithBodyWithResponse Enqueue a task\n\nThe queue is created with default settings if it doesn't exist, unless the server runs with \\`WORKLY\\_AUTO\\_CREATE\\_QUEUES=false\\`.\n\nIf \\`idempotency\\_key\\` matches an existing task in the queue, that task is returned with status 200 and nothing is enqueued.\n\nTakes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/queues/{queue}/tasks (the \\`CreateTask\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CreateTaskWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)\n```\nCreateTaskWithResponse Enqueue a task\n\nThe queue is created with default settings if it doesn't exist, unless the server runs with \\`WORKLY\\_AUTO\\_CREATE\\_QUEUES=false\\`.\n\nIf \\`idempotency\\_key\\` matches an existing task in the queue, that task is returned with status 200 and nothing is enqueued.\n\nTakes a body of the \\`application/json\\` content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/queues/{queue}/tasks (the \\`CreateTask\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CreateTasksWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTasksResponse, error)\n```\nCreateTasksWithBodyWithResponse Enqueue up to 100 tasks at once\n\nEnqueues all the tasks or none: if any task is invalid, nothing is enqueued and the error names the first invalid one (\\`tasks\\[3]: ...\\`). Idempotency keys work as for a single enqueue, including between tasks in the same batch.\n\nThe whole request is limited to the payload limit plus 256 KB.\n\nTakes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/queues/{queue}/tasks:batch (the \\`CreateTasks\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) CreateTasksWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTasksResponse, error)\n```\nCreateTasksWithResponse Enqueue up to 100 tasks at once\n\nEnqueues all the tasks or none: if any task is invalid, nothing is enqueued and the error names the first invalid one (\\`tasks\\[3]: ...\\`). Idempotency keys work as for a single enqueue, including between tasks in the same batch.\n\nThe whole request is limited to the payload limit plus 256 KB.\n\nTakes a body of the \\`application/json\\` content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/queues/{queue}/tasks:batch (the \\`CreateTasks\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) DeleteAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*DeleteAlertChannelResponse, error)\n```\nDeleteAlertChannelWithResponse Remove an alert channel\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with DELETE /v1/alert-channels/{id} (the \\`DeleteAlertChannel\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) DeleteQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*DeleteQueueResponse, error)\n```\nDeleteQueueWithResponse Delete a queue and all its tasks\n\nWorkly's own queues, \\`\\_workflows\\` and \\`\\_callbacks\\`, can't be deleted (\\`invalid\\_state\\`): their tasks are workflow steps and callbacks in flight.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with DELETE /v1/queues/{queue} (the \\`DeleteQueue\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) DeleteScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*DeleteScheduleResponse, error)\n```\nDeleteScheduleWithResponse Delete a schedule and all its runs\n\nA run in flight finishes, but its result isn't recorded.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with DELETE /v1/schedules/{schedule} (the \\`DeleteSchedule\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) DeleteWorkflowWithResponse(ctx context.Context, workflow WorkflowName, reqEditors ...RequestEditorFn) (*DeleteWorkflowResponse, error)\n```\nDeleteWorkflowWithResponse Delete a workflow\n\nDeletes the definition only. Its runs are kept (under retention), and runs still going finish under the definition they started with.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with DELETE /v1/workflows/{workflow} (the \\`DeleteWorkflow\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetActivityWithResponse(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*GetActivityResponse, error)\n```\nGetActivityWithResponse Count tasks created and finished over time\n\nCounts the workspace's tasks created in each bucket of the range, per queue, and the tasks that finished in it, by final state; oldest bucket first, and every bucket is listed, empty ones too. Buckets are 5 minutes for \\`1h\\`, 1 hour for \\`24h\\` and 6 hours for \\`7d\\`, aligned to UTC. Finished tasks are deleted after the server's retention period, so buckets further back than \\`retention\\_seconds\\` only count what is left.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/activity (the \\`GetActivity\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*GetGroupResponse, error)\n```\nGetGroupWithResponse Get a task group\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/groups/{id} (the \\`GetGroup\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetHealthzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthzResponse, error)\n```\nGetHealthzWithResponse Liveness probe\n\nReturns 200 while the process is running. Does not touch the database.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /healthz (the \\`GetHealthz\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetQueueActivityWithResponse(ctx context.Context, queue QueueName, params *GetQueueActivityParams, reqEditors ...RequestEditorFn) (*GetQueueActivityResponse, error)\n```\nGetQueueActivityWithResponse Count a queue's finished tasks\n\nCounts the tasks that finished since \\`since\\`, by final state, with percentiles of how long their latest attempt took. Finished tasks are deleted after the server's retention period, so a \\`since\\` further back than \\`retention\\_seconds\\` only counts what is left.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/queues/{queue}/activity (the \\`GetQueueActivity\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetQueueFailuresWithResponse(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, reqEditors ...RequestEditorFn) (*GetQueueFailuresResponse, error)\n```\nGetQueueFailuresWithResponse Group a queue's failed tasks by error\n\nGroups the queue's failed tasks by their latest error, most common first, so one broken endpoint or bad payload shows up as one line. Only the 10,000 most recently failed tasks are grouped.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/queues/{queue}/failures (the \\`GetQueueFailures\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*GetQueueResponse, error)\n```\nGetQueueWithResponse Get a queue\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/queues/{queue} (the \\`GetQueue\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetReadyzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetReadyzResponse, error)\n```\nGetReadyzWithResponse Readiness probe\n\nReturns 200 when the database is reachable and migrations are applied.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /readyz (the \\`GetReadyz\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetRunDeliveryWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunDeliveryResponse, error)\n```\nGetRunDeliveryWithResponse Get the request that delivers a run\n\nThe HTTP request Workly sends to deliver the run, as it would be sent now, with a fresh signature, as for \\`GET /v1/tasks/{id}/delivery\\`. Nothing is sent.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/runs/{id}/delivery (the \\`GetRunDelivery\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunResponse, error)\n```\nGetRunWithResponse Get a run\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/runs/{id} (the \\`GetRun\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*GetScheduleResponse, error)\n```\nGetScheduleWithResponse Get a schedule\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/schedules/{schedule} (the \\`GetSchedule\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetTaskDeliveryWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskDeliveryResponse, error)\n```\nGetTaskDeliveryWithResponse Get the request that delivers a task\n\nThe HTTP request Workly sends to deliver the task, as it would be sent now: the task's own headers plus Workly's (\\`Workly-Task-Id\\`, \\`Workly-Signature\\`, ...), and the exact body. The signature is fresh, so replaying the request (for example with curl) while fixing an endpoint passes verification until the timestamp is too old. Nothing is sent and the task doesn't change. \\`Workly-Attempt\\` is the next attempt for a pending task, otherwise the latest.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/tasks/{id}/delivery (the \\`GetTaskDelivery\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskResponse, error)\n```\nGetTaskWithResponse Get a task\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/tasks/{id} (the \\`GetTask\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetWorkflowRunWithResponse(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*GetWorkflowRunResponse, error)\n```\nGetWorkflowRunWithResponse Get a workflow run with its steps\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/workflow-runs/{id} (the \\`GetWorkflowRun\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) GetWorkflowWithResponse(ctx context.Context, workflow WorkflowName, reqEditors ...RequestEditorFn) (*GetWorkflowResponse, error)\n```\nGetWorkflowWithResponse Get a workflow\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/workflows/{workflow} (the \\`GetWorkflow\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListAlertChannelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAlertChannelsResponse, error)\n```\nListAlertChannelsWithResponse List alert channels\n\nWhere the workspace's alerts go. When tasks in a queue or runs of a schedule fail (after their last attempt), every channel gets an alert within about a minute, naming the errors. After that, a queue or schedule gets at most one alert every 30 minutes, covering the failures since its previous one.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/alert-channels (the \\`ListAlertChannels\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListAttemptsWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*ListAttemptsResponse, error)\n```\nListAttemptsWithResponse List a task's delivery attempts, oldest first\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/tasks/{id}/attempts (the \\`ListAttempts\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)\n```\nListGroupsWithResponse List task groups\n\nNewest first. List a group's tasks with \\`GET /v1/tasks?group\\_id=\\`.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/groups (the \\`ListGroups\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListQueuesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQueuesResponse, error)\n```\nListQueuesWithResponse List queues\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/queues (the \\`ListQueues\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListRunAttemptsWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*ListRunAttemptsResponse, error)\n```\nListRunAttemptsWithResponse List a run's delivery attempts, oldest first\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/runs/{id}/attempts (the \\`ListRunAttempts\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListRunsWithResponse(ctx context.Context, params *ListRunsParams, reqEditors ...RequestEditorFn) (*ListRunsResponse, error)\n```\nListRunsWithResponse List runs, newest first\n\nRuns of every schedule, or of one with \\`schedule\\`. A \\`schedule\\` that doesn't exist is \\`schedule\\_not\\_found\\`.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/runs (the \\`ListRuns\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListSchedulesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSchedulesResponse, error)\n```\nListSchedulesWithResponse List schedules\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/schedules (the \\`ListSchedules\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListTasksWithResponse(ctx context.Context, queue QueueName, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResponse, error)\n```\nListTasksWithResponse List a queue's tasks\n\nNewest first, unless \\`sort\\` and \\`order\\` say otherwise.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/queues/{queue}/tasks (the \\`ListTasks\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListWorkflowRunsWithResponse(ctx context.Context, params *ListWorkflowRunsParams, reqEditors ...RequestEditorFn) (*ListWorkflowRunsResponse, error)\n```\nListWorkflowRunsWithResponse List workflow runs, newest first\n\nRuns of every workflow, or of one with \\`workflow\\` (including a deleted one's).\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/workflow-runs (the \\`ListWorkflowRuns\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ListWorkflowsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListWorkflowsResponse, error)\n```\nListWorkflowsWithResponse List workflows\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/workflows (the \\`ListWorkflows\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) PauseQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*PauseQueueResponse, error)\n```\nPauseQueueWithResponse Pause a queue\n\nStops dispatching the queue's tasks. Deliveries already in flight finish, and tasks can still be enqueued.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/queues/{queue}/pause (the \\`PauseQueue\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) PauseScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*PauseScheduleResponse, error)\n```\nPauseScheduleWithResponse Pause a schedule\n\nStops the schedule from firing. Runs already pending or in flight still finish, and \"run now\" still works.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/schedules/{schedule}/pause (the \\`PauseSchedule\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) PreviewCronWithResponse(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*PreviewCronResponse, error)\n```\nPreviewCronWithResponse Preview a cron timetable\n\nThe next times a schedule with this cron expression and timezone would run, from now, without creating it. For forms that check a timetable as it's typed.\n\nWith \\`from\\` and \\`until\\`, it also lists every run in that window (at most 35 days) as \\`spans\\`, for calendars of what runs when.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/cron/preview (the \\`PreviewCron\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) PutQueueWithBodyWithResponse(ctx context.Context, queue QueueName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutQueueResponse, error)\n```\nPutQueueWithBodyWithResponse Create or update a queue\n\nDeclarative and idempotent: the queue ends up with exactly the given configuration, and omitted fields are reset to their defaults. This makes queue configuration easy to keep in code. It doesn't change whether the queue is paused.\n\nTakes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with PUT /v1/queues/{queue} (the \\`PutQueue\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) PutQueueWithResponse(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, reqEditors ...RequestEditorFn) (*PutQueueResponse, error)\n```\nPutQueueWithResponse Create or update a queue\n\nDeclarative and idempotent: the queue ends up with exactly the given configuration, and omitted fields are reset to their defaults. This makes queue configuration easy to keep in code. It doesn't change whether the queue is paused.\n\nTakes a body of the \\`application/json\\` content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with PUT /v1/queues/{queue} (the \\`PutQueue\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) PutScheduleWithBodyWithResponse(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutScheduleResponse, error)\n```\nPutScheduleWithBodyWithResponse Create or update a schedule\n\nDeclarative and idempotent: the schedule ends up with exactly the given settings, and omitted fields are reset to their defaults. It doesn't change whether the schedule is paused. The response's \\`next\\_runs\\` shows when it will run, so a cron expression can be checked before relying on it.\n\nRuns already created keep the request they were created with; retries use the schedule's current retry policy and timeout.\n\nTakes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with PUT /v1/schedules/{schedule} (the \\`PutSchedule\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) PutScheduleWithResponse(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*PutScheduleResponse, error)\n```\nPutScheduleWithResponse Create or update a schedule\n\nDeclarative and idempotent: the schedule ends up with exactly the given settings, and omitted fields are reset to their defaults. It doesn't change whether the schedule is paused. The response's \\`next\\_runs\\` shows when it will run, so a cron expression can be checked before relying on it.\n\nRuns already created keep the request they were created with; retries use the schedule's current retry policy and timeout.\n\nTakes a body of the \\`application/json\\` content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with PUT /v1/schedules/{schedule} (the \\`PutSchedule\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) PutWorkflowWithBodyWithResponse(ctx context.Context, workflow WorkflowName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutWorkflowResponse, error)\n```\nPutWorkflowWithBodyWithResponse Create or update a workflow\n\nDeclarative and idempotent: the workflow ends up with exactly the given steps and settings. A changed definition gets a new \\`version\\`. Runs already started keep the definition they started with; new runs use this one.\n\nTakes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with PUT /v1/workflows/{workflow} (the \\`PutWorkflow\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) PutWorkflowWithResponse(ctx context.Context, workflow WorkflowName, body PutWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*PutWorkflowResponse, error)\n```\nPutWorkflowWithResponse Create or update a workflow\n\nDeclarative and idempotent: the workflow ends up with exactly the given steps and settings. A changed definition gets a new \\`version\\`. Runs already started keep the definition they started with; new runs use this one.\n\nTakes a body of the \\`application/json\\` content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with PUT /v1/workflows/{workflow} (the \\`PutWorkflow\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ResumeQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*ResumeQueueResponse, error)\n```\nResumeQueueWithResponse Resume a paused queue\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/queues/{queue}/resume (the \\`ResumeQueue\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) ResumeScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*ResumeScheduleResponse, error)\n```\nResumeScheduleWithResponse Resume a paused schedule\n\nThe schedule fires again from its next slot after now. Slots that passed while it was paused are not run.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/schedules/{schedule}/resume (the \\`ResumeSchedule\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) RetryFailedTasksWithResponse(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, reqEditors ...RequestEditorFn) (*RetryFailedTasksResponse, error)\n```\nRetryFailedTasksWithResponse Retry every failed task in a queue\n\nReplays every failed task in the queue now, each with a fresh set of \\`max\\_attempts\\`, as \\`POST /v1/tasks/{id}/retry\\` does for one task. Use it to recover after an outage of the endpoint. Pause the queue first or set a rate limit to control how fast the replays are delivered.\n\nWith \\`last\\_error\\`, only the failed tasks whose latest error is exactly that (as \\`GET /v1/queues/{queue}/failures\\` groups them) are retried.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/queues/{queue}/retry-failed (the \\`RetryFailedTasks\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) RetryRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*RetryRunResponse, error)\n```\nRetryRunWithResponse Retry a run now\n\nMakes the run due now. A succeeded, failed, cancelled or skipped run is delivered again with a fresh set of \\`max\\_attempts\\`; a pending run just runs sooner. A run can't be retried while an attempt is in flight (\\`invalid\\_state\\`).\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/runs/{id}/retry (the \\`RetryRun\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) RetryTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*RetryTaskResponse, error)\n```\nRetryTaskWithResponse Retry a task now\n\nMakes the task due now. A succeeded, failed or cancelled task is replayed with a fresh set of \\`max\\_attempts\\`; its attempt numbers keep counting. A pending task (scheduled or waiting to retry) just runs sooner. A task can't be retried while an attempt is in flight (\\`invalid\\_state\\`).\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/tasks/{id}/retry (the \\`RetryTask\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) RetryWorkflowRunWithResponse(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*RetryWorkflowRunResponse, error)\n```\nRetryWorkflowRunWithResponse Retry a workflow run\n\nReopens a failed or cancelled run, under the definition it started with and with the same input: steps that succeeded stay, and the rest run again. Each step that runs again gets its task back, pending with a fresh set of attempts. A step that was waiting for a group follows the group: it succeeds if the group has since succeeded, and waits for it again if it is still going. The run's \\`attempt\\` goes up by one, and its \\`max\\_duration\\_seconds\\` starts over. Other runs are \\`invalid\\_state\\`.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/workflow-runs/{id}/retry (the \\`RetryWorkflowRun\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) SearchTasksWithResponse(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*SearchTasksResponse, error)\n```\nSearchTasksWithResponse Search tasks across queues\n\nAll filters are optional and combine with AND. To find one task by ID, use \\`GET /v1/tasks/{id}\\`. Newest first, unless \\`sort\\` and \\`order\\` say otherwise.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with GET /v1/tasks (the \\`SearchTasks\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) StartWorkflowRunWithBodyWithResponse(ctx context.Context, workflow WorkflowName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartWorkflowRunResponse, error)\n```\nStartWorkflowRunWithBodyWithResponse Start a workflow run\n\nStarts a run and enqueues the steps without dependencies. With an \\`idempotency\\_key\\` already used for a run of this workflow, that run is returned (200) and nothing starts.\n\nTakes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/workflows/{workflow}/runs (the \\`StartWorkflowRun\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) StartWorkflowRunWithResponse(ctx context.Context, workflow WorkflowName, body StartWorkflowRunJSONRequestBody, reqEditors ...RequestEditorFn) (*StartWorkflowRunResponse, error)\n```\nStartWorkflowRunWithResponse Start a workflow run\n\nStarts a run and enqueues the steps without dependencies. With an \\`idempotency\\_key\\` already used for a run of this workflow, that run is returned (200) and nothing starts.\n\nTakes a body of the \\`application/json\\` content type, and returns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/workflows/{workflow}/runs (the \\`StartWorkflowRun\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) TestAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*TestAlertChannelResponse, error)\n```\nTestAlertChannelWithResponse Send a test alert\n\nSends a test message to the channel now, to check it's set up right. If it can't be sent, the error (\\`alert\\_failed\\`, 502) says why.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/alert-channels/{id}/test (the \\`TestAlertChannel\\` operationId).\n\n```go\nfunc (c *ClientWithResponses) TriggerScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*TriggerScheduleResponse, error)\n```\nTriggerScheduleWithResponse Run a schedule now\n\nCreates a run that is delivered right away, with \\`trigger: manual\\`. It runs even if the schedule is paused or a run is in flight, and doesn't change when the schedule next fires.\n\nReturns a wrapper object for the known response body format(s).\n\nCorresponds with POST /v1/schedules/{schedule}/trigger (the \\`TriggerSchedule\\` operationId).\n\n```go\ntype ClientWithResponsesInterface interface {\n\n\t// GetHealthzWithResponse Liveness probe\n\t//\n\t// Returns 200 while the process is running. Does not touch the database.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /healthz (the `GetHealthz` operationId).\n\tGetHealthzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthzResponse, error)\n\n\t// GetReadyzWithResponse Readiness probe\n\t//\n\t// Returns 200 when the database is reachable and migrations are applied.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /readyz (the `GetReadyz` operationId).\n\tGetReadyzWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetReadyzResponse, error)\n\n\t// GetActivityWithResponse Count tasks created and finished over time\n\t//\n\t// Counts the workspace's tasks created in each bucket of the range, per\n\t// queue, and the tasks that finished in it, by final state; oldest\n\t// bucket first, and every bucket is listed, empty ones too.\n\t// Buckets are 5 minutes for `1h`, 1 hour for `24h` and 6 hours for `7d`,\n\t// aligned to UTC. Finished tasks are deleted after the server's\n\t// retention period, so buckets further back than `retention_seconds`\n\t// only count what is left.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/activity (the `GetActivity` operationId).\n\tGetActivityWithResponse(ctx context.Context, params *GetActivityParams, reqEditors ...RequestEditorFn) (*GetActivityResponse, error)\n\n\t// ListAlertChannelsWithResponse List alert channels\n\t//\n\t// Where the workspace's alerts go. When tasks in a queue or runs of a\n\t// schedule fail (after their last attempt), every channel gets an\n\t// alert within about a minute, naming the errors. After that, a queue\n\t// or schedule gets at most one alert every 30 minutes, covering the\n\t// failures since its previous one.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/alert-channels (the `ListAlertChannels` operationId).\n\tListAlertChannelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAlertChannelsResponse, error)\n\n\t// CreateAlertChannelWithBodyWithResponse Add an alert channel\n\t//\n\t// A workspace has at most 10 channels. Email channels need a server\n\t// that can send email (`email_enabled` in the list); a Slack channel\n\t// takes an incoming webhook URL (`https://hooks.slack.com/...`).\n\t//\n\t// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).\n\tCreateAlertChannelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertChannelResponse, error)\n\n\t// CreateAlertChannelWithResponse Add an alert channel\n\t//\n\t// A workspace has at most 10 channels. Email channels need a server\n\t// that can send email (`email_enabled` in the list); a Slack channel\n\t// takes an incoming webhook URL (`https://hooks.slack.com/...`).\n\t//\n\t// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/alert-channels (the `CreateAlertChannel` operationId).\n\tCreateAlertChannelWithResponse(ctx context.Context, body CreateAlertChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertChannelResponse, error)\n\n\t// DeleteAlertChannelWithResponse Remove an alert channel\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with DELETE /v1/alert-channels/{id} (the `DeleteAlertChannel` operationId).\n\tDeleteAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*DeleteAlertChannelResponse, error)\n\n\t// TestAlertChannelWithResponse Send a test alert\n\t//\n\t// Sends a test message to the channel now, to check it's set up\n\t// right. If it can't be sent, the error (`alert_failed`, 502) says\n\t// why.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/alert-channels/{id}/test (the `TestAlertChannel` operationId).\n\tTestAlertChannelWithResponse(ctx context.Context, id AlertChannelID, reqEditors ...RequestEditorFn) (*TestAlertChannelResponse, error)\n\n\t// PreviewCronWithResponse Preview a cron timetable\n\t//\n\t// The next times a schedule with this cron expression and timezone\n\t// would run, from now, without creating it. For forms that check a\n\t// timetable as it's typed.\n\t//\n\t// With `from` and `until`, it also lists every run in that window\n\t// (at most 35 days) as `spans`, for calendars of what runs when.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/cron/preview (the `PreviewCron` operationId).\n\tPreviewCronWithResponse(ctx context.Context, params *PreviewCronParams, reqEditors ...RequestEditorFn) (*PreviewCronResponse, error)\n\n\t// ListGroupsWithResponse List task groups\n\t//\n\t// Newest first. List a group's tasks with `GET /v1/tasks?group_id=`.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/groups (the `ListGroups` operationId).\n\tListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)\n\n\t// CreateGroupWithBodyWithResponse Create a task group\n\t//\n\t// Creates an open group. Enqueue tasks into it with `group_id`, then\n\t// close it with `POST /v1/groups/{id}/close`. Once it is closed and\n\t// every task in it has succeeded, failed or been cancelled, it\n\t// completes and enqueues its `on_complete` callback, once.\n\t//\n\t// If `idempotency_key` matches an existing group, that group is\n\t// returned with status 200 and nothing is created.\n\t//\n\t// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/groups (the `CreateGroup` operationId).\n\tCreateGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)\n\n\t// CreateGroupWithResponse Create a task group\n\t//\n\t// Creates an open group. Enqueue tasks into it with `group_id`, then\n\t// close it with `POST /v1/groups/{id}/close`. Once it is closed and\n\t// every task in it has succeeded, failed or been cancelled, it\n\t// completes and enqueues its `on_complete` callback, once.\n\t//\n\t// If `idempotency_key` matches an existing group, that group is\n\t// returned with status 200 and nothing is created.\n\t//\n\t// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/groups (the `CreateGroup` operationId).\n\tCreateGroupWithResponse(ctx context.Context, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error)\n\n\t// GetGroupWithResponse Get a task group\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/groups/{id} (the `GetGroup` operationId).\n\tGetGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*GetGroupResponse, error)\n\n\t// CloseGroupWithResponse Close a task group\n\t//\n\t// Stops the group from accepting tasks; enqueueing into it then fails\n\t// with `group_closed`. If its tasks have all finished (or it has none),\n\t// it completes at once. Closing a closed group does nothing.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/groups/{id}/close (the `CloseGroup` operationId).\n\tCloseGroupWithResponse(ctx context.Context, id GroupID, reqEditors ...RequestEditorFn) (*CloseGroupResponse, error)\n\n\t// ListQueuesWithResponse List queues\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/queues (the `ListQueues` operationId).\n\tListQueuesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQueuesResponse, error)\n\n\t// DeleteQueueWithResponse Delete a queue and all its tasks\n\t//\n\t// Workly's own queues, `_workflows` and `_callbacks`, can't be deleted\n\t// (`invalid_state`): their tasks are workflow steps and callbacks in\n\t// flight.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with DELETE /v1/queues/{queue} (the `DeleteQueue` operationId).\n\tDeleteQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*DeleteQueueResponse, error)\n\n\t// GetQueueWithResponse Get a queue\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/queues/{queue} (the `GetQueue` operationId).\n\tGetQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*GetQueueResponse, error)\n\n\t// PutQueueWithBodyWithResponse Create or update a queue\n\t//\n\t// Declarative and idempotent: the queue ends up with exactly the given\n\t// configuration, and omitted fields are reset to their defaults. This\n\t// makes queue configuration easy to keep in code. It doesn't change\n\t// whether the queue is paused.\n\t//\n\t// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).\n\tPutQueueWithBodyWithResponse(ctx context.Context, queue QueueName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutQueueResponse, error)\n\n\t// PutQueueWithResponse Create or update a queue\n\t//\n\t// Declarative and idempotent: the queue ends up with exactly the given\n\t// configuration, and omitted fields are reset to their defaults. This\n\t// makes queue configuration easy to keep in code. It doesn't change\n\t// whether the queue is paused.\n\t//\n\t// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with PUT /v1/queues/{queue} (the `PutQueue` operationId).\n\tPutQueueWithResponse(ctx context.Context, queue QueueName, body PutQueueJSONRequestBody, reqEditors ...RequestEditorFn) (*PutQueueResponse, error)\n\n\t// GetQueueActivityWithResponse Count a queue's finished tasks\n\t//\n\t// Counts the tasks that finished since `since`, by final state, with\n\t// percentiles of how long their latest attempt took. Finished\n\t// tasks are deleted after the server's retention period, so a `since`\n\t// further back than `retention_seconds` only counts what is left.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/queues/{queue}/activity (the `GetQueueActivity` operationId).\n\tGetQueueActivityWithResponse(ctx context.Context, queue QueueName, params *GetQueueActivityParams, reqEditors ...RequestEditorFn) (*GetQueueActivityResponse, error)\n\n\t// CancelPendingTasksWithResponse Cancel a queue's pending tasks\n\t//\n\t// Cancels every pending task, including scheduled ones and ones waiting\n\t// to retry, as `POST /v1/tasks/{id}/cancel` does for one task. Running\n\t// tasks finish their attempt. Cancelled tasks stay in the history until\n\t// retention removes them, and can be retried.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/cancel-pending (the `CancelPendingTasks` operationId).\n\tCancelPendingTasksWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*CancelPendingTasksResponse, error)\n\n\t// GetQueueFailuresWithResponse Group a queue's failed tasks by error\n\t//\n\t// Groups the queue's failed tasks by their latest error, most common\n\t// first, so one broken endpoint or bad payload shows up as one line.\n\t// Only the 10,000 most recently failed tasks are grouped.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/queues/{queue}/failures (the `GetQueueFailures` operationId).\n\tGetQueueFailuresWithResponse(ctx context.Context, queue QueueName, params *GetQueueFailuresParams, reqEditors ...RequestEditorFn) (*GetQueueFailuresResponse, error)\n\n\t// PauseQueueWithResponse Pause a queue\n\t//\n\t// Stops dispatching the queue's tasks. Deliveries already in flight\n\t// finish, and tasks can still be enqueued.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/pause (the `PauseQueue` operationId).\n\tPauseQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*PauseQueueResponse, error)\n\n\t// ResumeQueueWithResponse Resume a paused queue\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/resume (the `ResumeQueue` operationId).\n\tResumeQueueWithResponse(ctx context.Context, queue QueueName, reqEditors ...RequestEditorFn) (*ResumeQueueResponse, error)\n\n\t// RetryFailedTasksWithResponse Retry every failed task in a queue\n\t//\n\t// Replays every failed task in the queue now, each with a fresh set of\n\t// `max_attempts`, as `POST /v1/tasks/{id}/retry` does for one task. Use\n\t// it to recover after an outage of the endpoint. Pause the queue first\n\t// or set a rate limit to control how fast the replays are delivered.\n\t//\n\t// With `last_error`, only the failed tasks whose latest error is exactly\n\t// that (as `GET /v1/queues/{queue}/failures` groups them) are retried.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/retry-failed (the `RetryFailedTasks` operationId).\n\tRetryFailedTasksWithResponse(ctx context.Context, queue QueueName, params *RetryFailedTasksParams, reqEditors ...RequestEditorFn) (*RetryFailedTasksResponse, error)\n\n\t// ListTasksWithResponse List a queue's tasks\n\t//\n\t// Newest first, unless `sort` and `order` say otherwise.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/queues/{queue}/tasks (the `ListTasks` operationId).\n\tListTasksWithResponse(ctx context.Context, queue QueueName, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResponse, error)\n\n\t// CreateTaskWithBodyWithResponse Enqueue a task\n\t//\n\t// The queue is created with default settings if it doesn't exist, unless\n\t// the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.\n\t//\n\t// If `idempotency_key` matches an existing task in the queue, that task\n\t// is returned with status 200 and nothing is enqueued.\n\t//\n\t// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).\n\tCreateTaskWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)\n\n\t// CreateTaskWithResponse Enqueue a task\n\t//\n\t// The queue is created with default settings if it doesn't exist, unless\n\t// the server runs with `WORKLY_AUTO_CREATE_QUEUES=false`.\n\t//\n\t// If `idempotency_key` matches an existing task in the queue, that task\n\t// is returned with status 200 and nothing is enqueued.\n\t//\n\t// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/tasks (the `CreateTask` operationId).\n\tCreateTaskWithResponse(ctx context.Context, queue QueueName, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)\n\n\t// CreateTasksWithBodyWithResponse Enqueue up to 100 tasks at once\n\t//\n\t// Enqueues all the tasks or none: if any task is invalid, nothing is\n\t// enqueued and the error names the first invalid one (`tasks[3]: ...`).\n\t// Idempotency keys work as for a single enqueue, including between\n\t// tasks in the same batch.\n\t//\n\t// The whole request is limited to the payload limit plus 256 KB.\n\t//\n\t// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).\n\tCreateTasksWithBodyWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTasksResponse, error)\n\n\t// CreateTasksWithResponse Enqueue up to 100 tasks at once\n\t//\n\t// Enqueues all the tasks or none: if any task is invalid, nothing is\n\t// enqueued and the error names the first invalid one (`tasks[3]: ...`).\n\t// Idempotency keys work as for a single enqueue, including between\n\t// tasks in the same batch.\n\t//\n\t// The whole request is limited to the payload limit plus 256 KB.\n\t//\n\t// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/queues/{queue}/tasks:batch (the `CreateTasks` operationId).\n\tCreateTasksWithResponse(ctx context.Context, queue QueueName, params *CreateTasksParams, body CreateTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTasksResponse, error)\n\n\t// ListRunsWithResponse List runs, newest first\n\t//\n\t// Runs of every schedule, or of one with `schedule`. A `schedule` that\n\t// doesn't exist is `schedule_not_found`.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/runs (the `ListRuns` operationId).\n\tListRunsWithResponse(ctx context.Context, params *ListRunsParams, reqEditors ...RequestEditorFn) (*ListRunsResponse, error)\n\n\t// GetRunWithResponse Get a run\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/runs/{id} (the `GetRun` operationId).\n\tGetRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunResponse, error)\n\n\t// ListRunAttemptsWithResponse List a run's delivery attempts, oldest first\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/runs/{id}/attempts (the `ListRunAttempts` operationId).\n\tListRunAttemptsWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*ListRunAttemptsResponse, error)\n\n\t// CancelRunWithResponse Cancel a run\n\t//\n\t// Cancels a pending or running run. A running run's current attempt\n\t// finishes and is recorded, but the run isn't retried. Cancelling a\n\t// cancelled run does nothing; a finished or skipped run can't be\n\t// cancelled (`invalid_state`).\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/runs/{id}/cancel (the `CancelRun` operationId).\n\tCancelRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*CancelRunResponse, error)\n\n\t// GetRunDeliveryWithResponse Get the request that delivers a run\n\t//\n\t// The HTTP request Workly sends to deliver the run, as it would be sent\n\t// now, with a fresh signature, as for `GET /v1/tasks/{id}/delivery`.\n\t// Nothing is sent.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/runs/{id}/delivery (the `GetRunDelivery` operationId).\n\tGetRunDeliveryWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*GetRunDeliveryResponse, error)\n\n\t// RetryRunWithResponse Retry a run now\n\t//\n\t// Makes the run due now. A succeeded, failed, cancelled or skipped run\n\t// is delivered again with a fresh set of `max_attempts`; a pending run\n\t// just runs sooner. A run can't be retried while an attempt is in\n\t// flight (`invalid_state`).\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/runs/{id}/retry (the `RetryRun` operationId).\n\tRetryRunWithResponse(ctx context.Context, id RunID, reqEditors ...RequestEditorFn) (*RetryRunResponse, error)\n\n\t// ListSchedulesWithResponse List schedules\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/schedules (the `ListSchedules` operationId).\n\tListSchedulesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSchedulesResponse, error)\n\n\t// DeleteScheduleWithResponse Delete a schedule and all its runs\n\t//\n\t// A run in flight finishes, but its result isn't recorded.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with DELETE /v1/schedules/{schedule} (the `DeleteSchedule` operationId).\n\tDeleteScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*DeleteScheduleResponse, error)\n\n\t// GetScheduleWithResponse Get a schedule\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/schedules/{schedule} (the `GetSchedule` operationId).\n\tGetScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*GetScheduleResponse, error)\n\n\t// PutScheduleWithBodyWithResponse Create or update a schedule\n\t//\n\t// Declarative and idempotent: the schedule ends up with exactly the\n\t// given settings, and omitted fields are reset to their defaults. It\n\t// doesn't change whether the schedule is paused. The response's\n\t// `next_runs` shows when it will run, so a cron expression can be\n\t// checked before relying on it.\n\t//\n\t// Runs already created keep the request they were created with; retries\n\t// use the schedule's current retry policy and timeout.\n\t//\n\t// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).\n\tPutScheduleWithBodyWithResponse(ctx context.Context, schedule ScheduleName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutScheduleResponse, error)\n\n\t// PutScheduleWithResponse Create or update a schedule\n\t//\n\t// Declarative and idempotent: the schedule ends up with exactly the\n\t// given settings, and omitted fields are reset to their defaults. It\n\t// doesn't change whether the schedule is paused. The response's\n\t// `next_runs` shows when it will run, so a cron expression can be\n\t// checked before relying on it.\n\t//\n\t// Runs already created keep the request they were created with; retries\n\t// use the schedule's current retry policy and timeout.\n\t//\n\t// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with PUT /v1/schedules/{schedule} (the `PutSchedule` operationId).\n\tPutScheduleWithResponse(ctx context.Context, schedule ScheduleName, body PutScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*PutScheduleResponse, error)\n\n\t// PauseScheduleWithResponse Pause a schedule\n\t//\n\t// Stops the schedule from firing. Runs already pending or in flight\n\t// still finish, and \"run now\" still works.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/schedules/{schedule}/pause (the `PauseSchedule` operationId).\n\tPauseScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*PauseScheduleResponse, error)\n\n\t// ResumeScheduleWithResponse Resume a paused schedule\n\t//\n\t// The schedule fires again from its next slot after now. Slots that\n\t// passed while it was paused are not run.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/schedules/{schedule}/resume (the `ResumeSchedule` operationId).\n\tResumeScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*ResumeScheduleResponse, error)\n\n\t// TriggerScheduleWithResponse Run a schedule now\n\t//\n\t// Creates a run that is delivered right away, with `trigger: manual`.\n\t// It runs even if the schedule is paused or a run is in flight, and\n\t// doesn't change when the schedule next fires.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/schedules/{schedule}/trigger (the `TriggerSchedule` operationId).\n\tTriggerScheduleWithResponse(ctx context.Context, schedule ScheduleName, reqEditors ...RequestEditorFn) (*TriggerScheduleResponse, error)\n\n\t// SearchTasksWithResponse Search tasks across queues\n\t//\n\t// All filters are optional and combine with AND. To find one task by\n\t// ID, use `GET /v1/tasks/{id}`. Newest first, unless `sort` and\n\t// `order` say otherwise.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/tasks (the `SearchTasks` operationId).\n\tSearchTasksWithResponse(ctx context.Context, params *SearchTasksParams, reqEditors ...RequestEditorFn) (*SearchTasksResponse, error)\n\n\t// GetTaskWithResponse Get a task\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/tasks/{id} (the `GetTask` operationId).\n\tGetTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskResponse, error)\n\n\t// ListAttemptsWithResponse List a task's delivery attempts, oldest first\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/tasks/{id}/attempts (the `ListAttempts` operationId).\n\tListAttemptsWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*ListAttemptsResponse, error)\n\n\t// CancelTaskWithResponse Cancel a task\n\t//\n\t// Cancels a pending or running task. A running task's current attempt\n\t// finishes and is recorded, but the task isn't retried. Cancelling a\n\t// cancelled task does nothing; a succeeded or failed task can't be\n\t// cancelled (`invalid_state`).\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/tasks/{id}/cancel (the `CancelTask` operationId).\n\tCancelTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*CancelTaskResponse, error)\n\n\t// GetTaskDeliveryWithResponse Get the request that delivers a task\n\t//\n\t// The HTTP request Workly sends to deliver the task, as it would be sent\n\t// now: the task's own headers plus Workly's (`Workly-Task-Id`,\n\t// `Workly-Signature`, ...), and the exact body. The signature is fresh,\n\t// so replaying the request (for example with curl) while fixing an\n\t// endpoint passes verification until the timestamp is too old. Nothing\n\t// is sent and the task doesn't change. `Workly-Attempt` is the next\n\t// attempt for a pending task, otherwise the latest.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/tasks/{id}/delivery (the `GetTaskDelivery` operationId).\n\tGetTaskDeliveryWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*GetTaskDeliveryResponse, error)\n\n\t// RetryTaskWithResponse Retry a task now\n\t//\n\t// Makes the task due now. A succeeded, failed or cancelled task is\n\t// replayed with a fresh set of `max_attempts`; its attempt numbers keep\n\t// counting. A pending task (scheduled or waiting to retry) just runs\n\t// sooner. A task can't be retried while an attempt is in flight\n\t// (`invalid_state`).\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/tasks/{id}/retry (the `RetryTask` operationId).\n\tRetryTaskWithResponse(ctx context.Context, id TaskID, reqEditors ...RequestEditorFn) (*RetryTaskResponse, error)\n\n\t// ListWorkflowRunsWithResponse List workflow runs, newest first\n\t//\n\t// Runs of every workflow, or of one with `workflow` (including a\n\t// deleted one's).\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/workflow-runs (the `ListWorkflowRuns` operationId).\n\tListWorkflowRunsWithResponse(ctx context.Context, params *ListWorkflowRunsParams, reqEditors ...RequestEditorFn) (*ListWorkflowRunsResponse, error)\n\n\t// GetWorkflowRunWithResponse Get a workflow run with its steps\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/workflow-runs/{id} (the `GetWorkflowRun` operationId).\n\tGetWorkflowRunWithResponse(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*GetWorkflowRunResponse, error)\n\n\t// CancelWorkflowRunWithResponse Cancel a workflow run\n\t//\n\t// Steps that haven't started are skipped, and their pending tasks\n\t// cancelled. Requests already being delivered finish and are recorded,\n\t// but start nothing. Cancelling a cancelled run is a no-op; other\n\t// finished runs are `invalid_state`.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/workflow-runs/{id}/cancel (the `CancelWorkflowRun` operationId).\n\tCancelWorkflowRunWithResponse(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*CancelWorkflowRunResponse, error)\n\n\t// RetryWorkflowRunWithResponse Retry a workflow run\n\t//\n\t// Reopens a failed or cancelled run, under the definition it started\n\t// with and with the same input: steps that succeeded stay, and the\n\t// rest run again. Each step that runs again gets its task back,\n\t// pending with a fresh set of attempts. A step that was waiting for a\n\t// group follows the group: it succeeds if the group has since\n\t// succeeded, and waits for it again if it is still going. The run's\n\t// `attempt` goes up by one, and its `max_duration_seconds` starts\n\t// over. Other runs are `invalid_state`.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/workflow-runs/{id}/retry (the `RetryWorkflowRun` operationId).\n\tRetryWorkflowRunWithResponse(ctx context.Context, id WorkflowRunID, reqEditors ...RequestEditorFn) (*RetryWorkflowRunResponse, error)\n\n\t// ListWorkflowsWithResponse List workflows\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/workflows (the `ListWorkflows` operationId).\n\tListWorkflowsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListWorkflowsResponse, error)\n\n\t// DeleteWorkflowWithResponse Delete a workflow\n\t//\n\t// Deletes the definition only. Its runs are kept (under retention), and\n\t// runs still going finish under the definition they started with.\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with DELETE /v1/workflows/{workflow} (the `DeleteWorkflow` operationId).\n\tDeleteWorkflowWithResponse(ctx context.Context, workflow WorkflowName, reqEditors ...RequestEditorFn) (*DeleteWorkflowResponse, error)\n\n\t// GetWorkflowWithResponse Get a workflow\n\t//\n\t// Returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with GET /v1/workflows/{workflow} (the `GetWorkflow` operationId).\n\tGetWorkflowWithResponse(ctx context.Context, workflow WorkflowName, reqEditors ...RequestEditorFn) (*GetWorkflowResponse, error)\n\n\t// PutWorkflowWithBodyWithResponse Create or update a workflow\n\t//\n\t// Declarative and idempotent: the workflow ends up with exactly the\n\t// given steps and settings. A changed definition gets a new `version`.\n\t// Runs already started keep the definition they started with; new runs\n\t// use this one.\n\t//\n\t// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with PUT /v1/workflows/{workflow} (the `PutWorkflow` operationId).\n\tPutWorkflowWithBodyWithResponse(ctx context.Context, workflow WorkflowName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutWorkflowResponse, error)\n\n\t// PutWorkflowWithResponse Create or update a workflow\n\t//\n\t// Declarative and idempotent: the workflow ends up with exactly the\n\t// given steps and settings. A changed definition gets a new `version`.\n\t// Runs already started keep the definition they started with; new runs\n\t// use this one.\n\t//\n\t// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with PUT /v1/workflows/{workflow} (the `PutWorkflow` operationId).\n\tPutWorkflowWithResponse(ctx context.Context, workflow WorkflowName, body PutWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*PutWorkflowResponse, error)\n\n\t// StartWorkflowRunWithBodyWithResponse Start a workflow run\n\t//\n\t// Starts a run and enqueues the steps without dependencies. With an\n\t// `idempotency_key` already used for a run of this workflow, that run\n\t// is returned (200) and nothing starts.\n\t//\n\t// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/workflows/{workflow}/runs (the `StartWorkflowRun` operationId).\n\tStartWorkflowRunWithBodyWithResponse(ctx context.Context, workflow WorkflowName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartWorkflowRunResponse, error)\n\n\t// StartWorkflowRunWithResponse Start a workflow run\n\t//\n\t// Starts a run and enqueues the steps without dependencies. With an\n\t// `idempotency_key` already used for a run of this workflow, that run\n\t// is returned (200) and nothing starts.\n\t//\n\t// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).\n\t//\n\t// Corresponds with POST /v1/workflows/{workflow}/runs (the `StartWorkflowRun` operationId).\n\tStartWorkflowRunWithResponse(ctx context.Context, workflow WorkflowName, body StartWorkflowRunJSONRequestBody, reqEditors ...RequestEditorFn) (*StartWorkflowRunResponse, error)\n}\n```\nClientWithResponsesInterface is the interface specification for the client with responses above.\n\n```go\ntype CloseGroupResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Group\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseCloseGroupResponse(rsp *http.Response) (*CloseGroupResponse, error)\n```\nParseCloseGroupResponse parses an HTTP response from a CloseGroupWithResponse call\n\n```go\nfunc (r CloseGroupResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r CloseGroupResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r CloseGroupResponse) GetJSON200() *Group\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r CloseGroupResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r CloseGroupResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r CloseGroupResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype CreateAlertChannelJSONRequestBody = NewAlertChannel\n```\nCreateAlertChannelJSONRequestBody defines body for CreateAlertChannel for application/json ContentType.\n\n```go\ntype CreateAlertChannelResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON201 the response for an HTTP 201 `application/json` response\n\tJSON201 *AlertChannel\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseCreateAlertChannelResponse(rsp *http.Response) (*CreateAlertChannelResponse, error)\n```\nParseCreateAlertChannelResponse parses an HTTP response from a CreateAlertChannelWithResponse call\n\n```go\nfunc (r CreateAlertChannelResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r CreateAlertChannelResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r CreateAlertChannelResponse) GetJSON201() *AlertChannel\n```\nGetJSON201 returns the response for an HTTP 201 \\`application/json\\` response\n\n```go\nfunc (r CreateAlertChannelResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r CreateAlertChannelResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r CreateAlertChannelResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype CreateGroupJSONRequestBody = NewGroup\n```\nCreateGroupJSONRequestBody defines body for CreateGroup for application/json ContentType.\n\n```go\ntype CreateGroupResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Group\n\t// JSON201 the response for an HTTP 201 `application/json` response\n\tJSON201 *Group\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseCreateGroupResponse(rsp *http.Response) (*CreateGroupResponse, error)\n```\nParseCreateGroupResponse parses an HTTP response from a CreateGroupWithResponse call\n\n```go\nfunc (r CreateGroupResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r CreateGroupResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r CreateGroupResponse) GetJSON200() *Group\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r CreateGroupResponse) GetJSON201() *Group\n```\nGetJSON201 returns the response for an HTTP 201 \\`application/json\\` response\n\n```go\nfunc (r CreateGroupResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r CreateGroupResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r CreateGroupResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype CreateTaskJSONRequestBody = EnqueueRequest\n```\nCreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.\n\n```go\ntype CreateTaskParams struct {\n\t// Traceparent W3C trace context, propagated on delivery.\n\tTraceparent *string `json:\"traceparent,omitempty\"`\n}\n```\nCreateTaskParams defines parameters for CreateTask.\n\n```go\ntype CreateTaskResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Task\n\t// JSON201 the response for an HTTP 201 `application/json` response\n\tJSON201 *Task\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseCreateTaskResponse(rsp *http.Response) (*CreateTaskResponse, error)\n```\nParseCreateTaskResponse parses an HTTP response from a CreateTaskWithResponse call\n\n```go\nfunc (r CreateTaskResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r CreateTaskResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r CreateTaskResponse) GetJSON200() *Task\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r CreateTaskResponse) GetJSON201() *Task\n```\nGetJSON201 returns the response for an HTTP 201 \\`application/json\\` response\n\n```go\nfunc (r CreateTaskResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r CreateTaskResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r CreateTaskResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype CreateTasksJSONRequestBody = BatchEnqueueRequest\n```\nCreateTasksJSONRequestBody defines body for CreateTasks for application/json ContentType.\n\n```go\ntype CreateTasksParams struct {\n\t// Traceparent W3C trace context, propagated on delivery of every task.\n\tTraceparent *string `json:\"traceparent,omitempty\"`\n}\n```\nCreateTasksParams defines parameters for CreateTasks.\n\n```go\ntype CreateTasksResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *BatchEnqueueResponse\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseCreateTasksResponse(rsp *http.Response) (*CreateTasksResponse, error)\n```\nParseCreateTasksResponse parses an HTTP response from a CreateTasksWithResponse call\n\n```go\nfunc (r CreateTasksResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r CreateTasksResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r CreateTasksResponse) GetJSON200() *BatchEnqueueResponse\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r CreateTasksResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r CreateTasksResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r CreateTasksResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype CronPreview struct {\n\t// IntervalSeconds The shortest time between two of its runs.\n\tIntervalSeconds int `json:\"interval_seconds\"`\n\n\t// NextRuns The next 5 runs, from now.\n\tNextRuns []time.Time `json:\"next_runs\"`\n\n\t// Spans With `from` and `until`: every run in the window, earliest first,\n\t// as runs at a fixed interval, so a schedule running every minute is\n\t// one span rather than thousands of times.\n\tSpans *[]CronSpan `json:\"spans,omitempty\"`\n}\n```\nCronPreview defines model for CronPreview.\n\n```go\ntype CronSpan struct {\n\tCount int `json:\"count\"`\n\n\t// EverySeconds 0 when `count` is 1.\n\tEverySeconds int       `json:\"every_seconds\"`\n\tStart        time.Time `json:\"start\"`\n}\n```\nCronSpan \\`count\\` runs, \\`every\\_seconds\\` apart, the first at \\`start\\`.\n\n```go\ntype Cursor = string\n```\nCursor defines model for Cursor.\n\n```go\ntype DeleteAlertChannelResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseDeleteAlertChannelResponse(rsp *http.Response) (*DeleteAlertChannelResponse, error)\n```\nParseDeleteAlertChannelResponse parses an HTTP response from a DeleteAlertChannelWithResponse call\n\n```go\nfunc (r DeleteAlertChannelResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r DeleteAlertChannelResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r DeleteAlertChannelResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r DeleteAlertChannelResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r DeleteAlertChannelResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype DeleteQueueResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseDeleteQueueResponse(rsp *http.Response) (*DeleteQueueResponse, error)\n```\nParseDeleteQueueResponse parses an HTTP response from a DeleteQueueWithResponse call\n\n```go\nfunc (r DeleteQueueResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r DeleteQueueResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r DeleteQueueResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r DeleteQueueResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r DeleteQueueResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype DeleteScheduleResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseDeleteScheduleResponse(rsp *http.Response) (*DeleteScheduleResponse, error)\n```\nParseDeleteScheduleResponse parses an HTTP response from a DeleteScheduleWithResponse call\n\n```go\nfunc (r DeleteScheduleResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r DeleteScheduleResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r DeleteScheduleResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r DeleteScheduleResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r DeleteScheduleResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype DeleteWorkflowResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseDeleteWorkflowResponse(rsp *http.Response) (*DeleteWorkflowResponse, error)\n```\nParseDeleteWorkflowResponse parses an HTTP response from a DeleteWorkflowWithResponse call\n\n```go\nfunc (r DeleteWorkflowResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r DeleteWorkflowResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r DeleteWorkflowResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r DeleteWorkflowResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r DeleteWorkflowResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype Delivery struct {\n\t// Body The body exactly as sent; the signature covers these bytes.\n\tBody string `json:\"body\"`\n\n\t// Headers Every header Workly sets, including the task's own.\n\tHeaders map[string]string `json:\"headers\"`\n\tMethod  HTTPMethod        `json:\"method\"`\n\tUrl     string            `json:\"url\"`\n}\n```\nDelivery defines model for Delivery.\n\n```go\ntype EnqueueRequest struct {\n\t// Body A raw text body. Use this or `payload`.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// ContentType Content type of `body`. Defaults to `text/plain; charset=utf-8`.\n\tContentType *string `json:\"content_type,omitempty\"`\n\n\t// DelaySeconds Deliver after this delay. Use this or `run_at`.\n\tDelaySeconds *float64 `json:\"delay_seconds,omitempty\"`\n\n\t// GroupId Adds the task to this group, which must be open (`group_closed`\n\t// otherwise). A task enqueued again with the same\n\t// `idempotency_key` isn't added twice.\n\tGroupId *string `json:\"group_id,omitempty\"`\n\n\t// Headers Headers sent with every delivery. `Workly-*` headers are reserved.\n\tHeaders *map[string]string `json:\"headers,omitempty\"`\n\n\t// IdempotencyKey Deduplicates enqueues within the queue.\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// MaxAttempts Overrides the queue's `max_attempts`.\n\tMaxAttempts *int        `json:\"max_attempts,omitempty\"`\n\tMethod      *HTTPMethod `json:\"method,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Payload A JSON body, sent with `Content-Type: application/json`. Use this or `body`.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\n\t// RunAt Deliver at this time. Use this or `delay_seconds`.\n\tRunAt *time.Time `json:\"run_at,omitempty\"`\n\n\t// TimeoutSeconds Overrides the queue's `timeout_seconds`.\n\tTimeoutSeconds *float64 `json:\"timeout_seconds,omitempty\"`\n\n\t// Url The http(s) URL to deliver the task to.\n\t//\n\t// Example: https://api.example.com/send-email\n\tUrl string `json:\"url\"`\n}\n```\nEnqueueRequest defines model for EnqueueRequest.\n\n```go\ntype Error struct {\n\tError ErrorBody `json:\"error\"`\n}\n```\nError defines model for Error.\n\n```go\ntype ErrorBody struct {\n\t// Code Stable, machine-readable error code.\n\t//\n\t// Example: queue_not_found\n\tCode string `json:\"code\"`\n\n\t// Message Human-readable description.\n\tMessage string `json:\"message\"`\n}\n```\nErrorBody defines model for ErrorBody.\n\n```go\ntype FailureGroup struct {\n\tCount int `json:\"count\"`\n\n\t// Error The tasks' `last_error`. Pass it as `last_error` to list or retry them.\n\tError        string    `json:\"error\"`\n\tLastFailedAt time.Time `json:\"last_failed_at\"`\n\n\t// LatestTaskId The most recently failed task in the group.\n\tLatestTaskId string `json:\"latest_task_id\"`\n\n\t// Outcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tOutcome *Outcome `json:\"outcome,omitempty\"`\n\n\t// ResponseBody The start (500 bytes) of the latest task's last response body, if it had one.\n\tResponseBody *string `json:\"response_body,omitempty\"`\n\n\t// StatusCode Absent if there was no response.\n\tStatusCode *int `json:\"status_code,omitempty\"`\n}\n```\nFailureGroup Failed tasks whose latest attempt ended the same way.\n\n```go\ntype GetActivityParams struct {\n\tRange *GetActivityParamsRange `form:\"range,omitempty\" json:\"range,omitempty\"`\n}\n```\nGetActivityParams defines parameters for GetActivity.\n\n```go\ntype GetActivityParamsRange string\n```\nGetActivityParamsRange defines parameters for GetActivity.\n\n```go\nconst (\n\tGetActivityParamsRangeN1h  GetActivityParamsRange = \"1h\"\n\tGetActivityParamsRangeN24h GetActivityParamsRange = \"24h\"\n\tGetActivityParamsRangeN7d  GetActivityParamsRange = \"7d\"\n)\n```\nDefines values for GetActivityParamsRange.\n\n```go\nfunc (e GetActivityParamsRange) Valid() bool\n```\nValid indicates whether the value is a known member of the GetActivityParamsRange enum.\n\n```go\ntype GetActivityResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Activity\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetActivityResponse(rsp *http.Response) (*GetActivityResponse, error)\n```\nParseGetActivityResponse parses an HTTP response from a GetActivityWithResponse call\n\n```go\nfunc (r GetActivityResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetActivityResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetActivityResponse) GetJSON200() *Activity\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetActivityResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetActivityResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetActivityResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetGroupResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Group\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetGroupResponse(rsp *http.Response) (*GetGroupResponse, error)\n```\nParseGetGroupResponse parses an HTTP response from a GetGroupWithResponse call\n\n```go\nfunc (r GetGroupResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetGroupResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetGroupResponse) GetJSON200() *Group\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetGroupResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetGroupResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetGroupResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetHealthzResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Health\n}\n```\n\n```go\nfunc ParseGetHealthzResponse(rsp *http.Response) (*GetHealthzResponse, error)\n```\nParseGetHealthzResponse parses an HTTP response from a GetHealthzWithResponse call\n\n```go\nfunc (r GetHealthzResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetHealthzResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetHealthzResponse) GetJSON200() *Health\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetHealthzResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetHealthzResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetQueueActivityParams struct {\n\t// Since Defaults to 7 days ago.\n\tSince *time.Time `form:\"since,omitempty\" json:\"since,omitempty\"`\n}\n```\nGetQueueActivityParams defines parameters for GetQueueActivity.\n\n```go\ntype GetQueueActivityResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *QueueActivity\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetQueueActivityResponse(rsp *http.Response) (*GetQueueActivityResponse, error)\n```\nParseGetQueueActivityResponse parses an HTTP response from a GetQueueActivityWithResponse call\n\n```go\nfunc (r GetQueueActivityResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetQueueActivityResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetQueueActivityResponse) GetJSON200() *QueueActivity\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetQueueActivityResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetQueueActivityResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetQueueActivityResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetQueueFailuresParams struct {\n\t// Limit How many groups to return.\n\tLimit *int `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nGetQueueFailuresParams defines parameters for GetQueueFailures.\n\n```go\ntype GetQueueFailuresResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *QueueFailures\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetQueueFailuresResponse(rsp *http.Response) (*GetQueueFailuresResponse, error)\n```\nParseGetQueueFailuresResponse parses an HTTP response from a GetQueueFailuresWithResponse call\n\n```go\nfunc (r GetQueueFailuresResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetQueueFailuresResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetQueueFailuresResponse) GetJSON200() *QueueFailures\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetQueueFailuresResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetQueueFailuresResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetQueueFailuresResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetQueueResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Queue\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetQueueResponse(rsp *http.Response) (*GetQueueResponse, error)\n```\nParseGetQueueResponse parses an HTTP response from a GetQueueWithResponse call\n\n```go\nfunc (r GetQueueResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetQueueResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetQueueResponse) GetJSON200() *Queue\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetQueueResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetQueueResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetQueueResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetReadyzResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Health\n\t// JSON503 the response for an HTTP 503 `application/json` response\n\tJSON503 *Error\n}\n```\n\n```go\nfunc ParseGetReadyzResponse(rsp *http.Response) (*GetReadyzResponse, error)\n```\nParseGetReadyzResponse parses an HTTP response from a GetReadyzWithResponse call\n\n```go\nfunc (r GetReadyzResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetReadyzResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetReadyzResponse) GetJSON200() *Health\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetReadyzResponse) GetJSON503() *Error\n```\nGetJSON503 returns the response for an HTTP 503 \\`application/json\\` response\n\n```go\nfunc (r GetReadyzResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetReadyzResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetRunDeliveryResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Delivery\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetRunDeliveryResponse(rsp *http.Response) (*GetRunDeliveryResponse, error)\n```\nParseGetRunDeliveryResponse parses an HTTP response from a GetRunDeliveryWithResponse call\n\n```go\nfunc (r GetRunDeliveryResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetRunDeliveryResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetRunDeliveryResponse) GetJSON200() *Delivery\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetRunDeliveryResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetRunDeliveryResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetRunDeliveryResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetRunResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Run\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetRunResponse(rsp *http.Response) (*GetRunResponse, error)\n```\nParseGetRunResponse parses an HTTP response from a GetRunWithResponse call\n\n```go\nfunc (r GetRunResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetRunResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetRunResponse) GetJSON200() *Run\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetRunResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetRunResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetRunResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetScheduleResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Schedule\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetScheduleResponse(rsp *http.Response) (*GetScheduleResponse, error)\n```\nParseGetScheduleResponse parses an HTTP response from a GetScheduleWithResponse call\n\n```go\nfunc (r GetScheduleResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetScheduleResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetScheduleResponse) GetJSON200() *Schedule\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetScheduleResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetScheduleResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetScheduleResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetTaskDeliveryResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Delivery\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetTaskDeliveryResponse(rsp *http.Response) (*GetTaskDeliveryResponse, error)\n```\nParseGetTaskDeliveryResponse parses an HTTP response from a GetTaskDeliveryWithResponse call\n\n```go\nfunc (r GetTaskDeliveryResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetTaskDeliveryResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetTaskDeliveryResponse) GetJSON200() *Delivery\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetTaskDeliveryResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetTaskDeliveryResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetTaskDeliveryResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetTaskResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Task\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetTaskResponse(rsp *http.Response) (*GetTaskResponse, error)\n```\nParseGetTaskResponse parses an HTTP response from a GetTaskWithResponse call\n\n```go\nfunc (r GetTaskResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetTaskResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetTaskResponse) GetJSON200() *Task\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetTaskResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetTaskResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetTaskResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetWorkflowResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Workflow\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetWorkflowResponse(rsp *http.Response) (*GetWorkflowResponse, error)\n```\nParseGetWorkflowResponse parses an HTTP response from a GetWorkflowWithResponse call\n\n```go\nfunc (r GetWorkflowResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetWorkflowResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetWorkflowResponse) GetJSON200() *Workflow\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetWorkflowResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetWorkflowResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetWorkflowResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetWorkflowRunResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *WorkflowRun\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseGetWorkflowRunResponse(rsp *http.Response) (*GetWorkflowRunResponse, error)\n```\nParseGetWorkflowRunResponse parses an HTTP response from a GetWorkflowRunWithResponse call\n\n```go\nfunc (r GetWorkflowRunResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r GetWorkflowRunResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r GetWorkflowRunResponse) GetJSON200() *WorkflowRun\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r GetWorkflowRunResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r GetWorkflowRunResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetWorkflowRunResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype Group struct {\n\t// CallbackTaskId The callback task, once the group has completed.\n\tCallbackTaskId *string    `json:\"callback_task_id,omitempty\"`\n\tCancelled      int        `json:\"cancelled\"`\n\tClosedAt       *time.Time `json:\"closed_at,omitempty\"`\n\tCreatedAt      time.Time  `json:\"created_at\"`\n\tFailed         int        `json:\"failed\"`\n\n\t// FinishedAt When the group completed.\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// Id Example: grp_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId             string  `json:\"id\"`\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\tName           *string `json:\"name,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Remaining Tasks still pending or running.\n\tRemaining int `json:\"remaining\"`\n\n\t// Status `open`: accepting tasks. `running`: closed, with tasks still to\n\t// finish. `succeeded`: every task succeeded. `failed`: every task\n\t// finished and at least one failed or was cancelled. Completed groups\n\t// (`succeeded` and `failed`) don't change again, even if a task in\n\t// them is retried.\n\tStatus    GroupStatus `json:\"status\"`\n\tSucceeded int         `json:\"succeeded\"`\n\n\t// Total Tasks enqueued into the group (less those whose queue was deleted).\n\tTotal int `json:\"total\"`\n}\n```\nGroup defines model for Group.\n\n```go\ntype GroupID = string\n```\nGroupID defines model for GroupID.\n\n```go\ntype GroupList struct {\n\tGroups []Group `json:\"groups\"`\n\n\t// NextCursor Pass as `cursor` to get the next page. Absent on the last page.\n\tNextCursor *string `json:\"next_cursor,omitempty\"`\n}\n```\nGroupList defines model for GroupList.\n\n```go\ntype GroupStatus string\n```\nGroupStatus \\`open\\`: accepting tasks. \\`running\\`: closed, with tasks still to finish. \\`succeeded\\`: every task succeeded. \\`failed\\`: every task finished and at least one failed or was cancelled. Completed groups (\\`succeeded\\` and \\`failed\\`) don't change again, even if a task in them is retried.\n\n```go\nconst (\n\tGroupStatusFailed    GroupStatus = \"failed\"\n\tGroupStatusOpen      GroupStatus = \"open\"\n\tGroupStatusRunning   GroupStatus = \"running\"\n\tGroupStatusSucceeded GroupStatus = \"succeeded\"\n)\n```\nDefines values for GroupStatus.\n\n```go\nfunc (e GroupStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the GroupStatus enum.\n\n```go\ntype GroupSummary struct {\n\tCancelled int     `json:\"cancelled\"`\n\tFailed    int     `json:\"failed\"`\n\tGroupId   string  `json:\"group_id\"`\n\tName      *string `json:\"name,omitempty\"`\n\n\t// Status `open`: accepting tasks. `running`: closed, with tasks still to\n\t// finish. `succeeded`: every task succeeded. `failed`: every task\n\t// finished and at least one failed or was cancelled. Completed groups\n\t// (`succeeded` and `failed`) don't change again, even if a task in\n\t// them is retried.\n\tStatus    GroupStatus `json:\"status\"`\n\tSucceeded int         `json:\"succeeded\"`\n\tTotal     int         `json:\"total\"`\n}\n```\nGroupSummary The body of a group's callback.\n\n```go\ntype HTTPMethod string\n```\nHTTPMethod defines model for HTTPMethod.\n\n```go\nconst (\n\tDELETE HTTPMethod = \"DELETE\"\n\tGET    HTTPMethod = \"GET\"\n\tPATCH  HTTPMethod = \"PATCH\"\n\tPOST   HTTPMethod = \"POST\"\n\tPUT    HTTPMethod = \"PUT\"\n)\n```\nDefines values for HTTPMethod.\n\n```go\nfunc (e HTTPMethod) Valid() bool\n```\nValid indicates whether the value is a known member of the HTTPMethod enum.\n\n```go\ntype Health struct {\n\t// Status Example: ok\n\tStatus string `json:\"status\"`\n}\n```\nHealth defines model for Health.\n\n```go\ntype HttpRequestDoer interface {\n\tDo(req *http.Request) (*http.Response, error)\n}\n```\nDoer performs HTTP requests.\n\nThe standard http.Client implements this interface.\n\n```go\ntype LastError = string\n```\nLastError defines model for LastError.\n\n```go\ntype LastRun struct {\n\tFinishedAt   *time.Time `json:\"finished_at,omitempty\"`\n\tId           string     `json:\"id\"`\n\tLastError    *string    `json:\"last_error,omitempty\"`\n\tLastStatus   *int       `json:\"last_status,omitempty\"`\n\tScheduledFor time.Time  `json:\"scheduled_for\"`\n\n\t// State A `skipped` run was never delivered: see `skip_reason`. It can be\n\t// retried to deliver it now.\n\tState RunState `json:\"state\"`\n\n\t// Trigger `schedule` for a cron slot, `manual` for \"run now\".\n\tTrigger RunTrigger `json:\"trigger\"`\n\n\t// WorkflowRunId The workflow run it started, for a schedule that starts a workflow.\n\tWorkflowRunId     *string            `json:\"workflow_run_id,omitempty\"`\n\tWorkflowRunStatus *WorkflowRunStatus `json:\"workflow_run_status,omitempty\"`\n}\n```\nLastRun The schedule's most recent run. Absent before the first.\n\n```go\ntype Limit = int\n```\nLimit defines model for Limit.\n\n```go\ntype ListAlertChannelsResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *AlertChannelList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListAlertChannelsResponse(rsp *http.Response) (*ListAlertChannelsResponse, error)\n```\nParseListAlertChannelsResponse parses an HTTP response from a ListAlertChannelsWithResponse call\n\n```go\nfunc (r ListAlertChannelsResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListAlertChannelsResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListAlertChannelsResponse) GetJSON200() *AlertChannelList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListAlertChannelsResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListAlertChannelsResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListAlertChannelsResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ListAttemptsResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *AttemptList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListAttemptsResponse(rsp *http.Response) (*ListAttemptsResponse, error)\n```\nParseListAttemptsResponse parses an HTTP response from a ListAttemptsWithResponse call\n\n```go\nfunc (r ListAttemptsResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListAttemptsResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListAttemptsResponse) GetJSON200() *AttemptList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListAttemptsResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListAttemptsResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListAttemptsResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ListGroupsParams struct {\n\tStatus *GroupStatus `form:\"status,omitempty\" json:\"status,omitempty\"`\n\tName   *string      `form:\"name,omitempty\" json:\"name,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nListGroupsParams defines parameters for ListGroups.\n\n```go\ntype ListGroupsResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *GroupList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListGroupsResponse(rsp *http.Response) (*ListGroupsResponse, error)\n```\nParseListGroupsResponse parses an HTTP response from a ListGroupsWithResponse call\n\n```go\nfunc (r ListGroupsResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListGroupsResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListGroupsResponse) GetJSON200() *GroupList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListGroupsResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListGroupsResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListGroupsResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ListQueuesResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *QueueList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListQueuesResponse(rsp *http.Response) (*ListQueuesResponse, error)\n```\nParseListQueuesResponse parses an HTTP response from a ListQueuesWithResponse call\n\n```go\nfunc (r ListQueuesResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListQueuesResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListQueuesResponse) GetJSON200() *QueueList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListQueuesResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListQueuesResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListQueuesResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ListRunAttemptsResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *AttemptList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListRunAttemptsResponse(rsp *http.Response) (*ListRunAttemptsResponse, error)\n```\nParseListRunAttemptsResponse parses an HTTP response from a ListRunAttemptsWithResponse call\n\n```go\nfunc (r ListRunAttemptsResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListRunAttemptsResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListRunAttemptsResponse) GetJSON200() *AttemptList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListRunAttemptsResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListRunAttemptsResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListRunAttemptsResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ListRunsParams struct {\n\t// Schedule Only this schedule's runs.\n\tSchedule *string   `form:\"schedule,omitempty\" json:\"schedule,omitempty\"`\n\tState    *RunState `form:\"state,omitempty\" json:\"state,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nListRunsParams defines parameters for ListRuns.\n\n```go\ntype ListRunsResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *RunList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListRunsResponse(rsp *http.Response) (*ListRunsResponse, error)\n```\nParseListRunsResponse parses an HTTP response from a ListRunsWithResponse call\n\n```go\nfunc (r ListRunsResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListRunsResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListRunsResponse) GetJSON200() *RunList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListRunsResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListRunsResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListRunsResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ListSchedulesResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *ScheduleList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListSchedulesResponse(rsp *http.Response) (*ListSchedulesResponse, error)\n```\nParseListSchedulesResponse parses an HTTP response from a ListSchedulesWithResponse call\n\n```go\nfunc (r ListSchedulesResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListSchedulesResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListSchedulesResponse) GetJSON200() *ScheduleList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListSchedulesResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListSchedulesResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListSchedulesResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ListTasksParams struct {\n\tState *TaskState `form:\"state,omitempty\" json:\"state,omitempty\"`\n\n\t// LastError Only tasks whose latest error is exactly this.\n\tLastError *LastError `form:\"last_error,omitempty\" json:\"last_error,omitempty\"`\n\n\t// Sort What to order tasks by:\n\t//\n\t// - `created_at` (the default): when the task was enqueued.\n\t// - `run_at`: when it runs next. Pending tasks are delivered in this\n\t//   order, so ascending lists them as they'll run.\n\t// - `last_attempt_at`: when its latest attempt finished. Tasks never\n\t//   attempted count as oldest.\n\t// - `attempt_count`: how many attempts it has had.\n\t//\n\t// Ties are broken by task ID.\n\tSort *ListTasksParamsSort `form:\"sort,omitempty\" json:\"sort,omitempty\"`\n\n\t// Order `asc` or `desc`. Defaults to `asc` (soonest first) for `run_at` and\n\t// to `desc` (newest or most first) for the rest.\n\tOrder *ListTasksParamsOrder `form:\"order,omitempty\" json:\"order,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nListTasksParams defines parameters for ListTasks.\n\n```go\ntype ListTasksParamsOrder string\n```\nListTasksParamsOrder defines parameters for ListTasks.\n\n```go\nconst (\n\tListTasksParamsOrderAsc  ListTasksParamsOrder = \"asc\"\n\tListTasksParamsOrderDesc ListTasksParamsOrder = \"desc\"\n)\n```\nDefines values for ListTasksParamsOrder.\n\n```go\nfunc (e ListTasksParamsOrder) Valid() bool\n```\nValid indicates whether the value is a known member of the ListTasksParamsOrder enum.\n\n```go\ntype ListTasksParamsSort string\n```\nListTasksParamsSort defines parameters for ListTasks.\n\n```go\nconst (\n\tListTasksParamsSortAttemptCount  ListTasksParamsSort = \"attempt_count\"\n\tListTasksParamsSortCreatedAt     ListTasksParamsSort = \"created_at\"\n\tListTasksParamsSortLastAttemptAt ListTasksParamsSort = \"last_attempt_at\"\n\tListTasksParamsSortRunAt         ListTasksParamsSort = \"run_at\"\n)\n```\nDefines values for ListTasksParamsSort.\n\n```go\nfunc (e ListTasksParamsSort) Valid() bool\n```\nValid indicates whether the value is a known member of the ListTasksParamsSort enum.\n\n```go\ntype ListTasksResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *TaskList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListTasksResponse(rsp *http.Response) (*ListTasksResponse, error)\n```\nParseListTasksResponse parses an HTTP response from a ListTasksWithResponse call\n\n```go\nfunc (r ListTasksResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListTasksResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListTasksResponse) GetJSON200() *TaskList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListTasksResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListTasksResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListTasksResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ListWorkflowRunsParams struct {\n\t// Workflow Only this workflow's runs.\n\tWorkflow *string            `form:\"workflow,omitempty\" json:\"workflow,omitempty\"`\n\tStatus   *WorkflowRunStatus `form:\"status,omitempty\" json:\"status,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nListWorkflowRunsParams defines parameters for ListWorkflowRuns.\n\n```go\ntype ListWorkflowRunsResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *WorkflowRunList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListWorkflowRunsResponse(rsp *http.Response) (*ListWorkflowRunsResponse, error)\n```\nParseListWorkflowRunsResponse parses an HTTP response from a ListWorkflowRunsWithResponse call\n\n```go\nfunc (r ListWorkflowRunsResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListWorkflowRunsResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListWorkflowRunsResponse) GetJSON200() *WorkflowRunList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListWorkflowRunsResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListWorkflowRunsResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListWorkflowRunsResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ListWorkflowsResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *WorkflowList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseListWorkflowsResponse(rsp *http.Response) (*ListWorkflowsResponse, error)\n```\nParseListWorkflowsResponse parses an HTTP response from a ListWorkflowsWithResponse call\n\n```go\nfunc (r ListWorkflowsResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ListWorkflowsResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ListWorkflowsResponse) GetJSON200() *WorkflowList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ListWorkflowsResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ListWorkflowsResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ListWorkflowsResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype MissedPolicy string\n```\nMissedPolicy What happens to slots missed while the server was down (a slot is missed if it can't fire within a minute). \\`skip\\` records the most recent missed slot as a \\`skipped\\` run; \\`catch\\_up\\` runs it. Either way, at most one run is created for the missed slots.\n\n```go\nconst (\n\tMissedPolicyCatchUp MissedPolicy = \"catch_up\"\n\tMissedPolicySkip    MissedPolicy = \"skip\"\n)\n```\nDefines values for MissedPolicy.\n\n```go\nfunc (e MissedPolicy) Valid() bool\n```\nValid indicates whether the value is a known member of the MissedPolicy enum.\n\n```go\ntype NewAlertChannel struct {\n\t// Target An email address, or a Slack incoming webhook URL.\n\t//\n\t// Example: oncall@example.com\n\tTarget string           `json:\"target\"`\n\tType   AlertChannelType `json:\"type\"`\n}\n```\nNewAlertChannel defines model for NewAlertChannel.\n\n```go\ntype NewGroup struct {\n\t// IdempotencyKey Deduplicates group creation within the workspace.\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// Name A label, e.g. the job the group is one run of. Names needn't be unique.\n\t//\n\t// Example: daily-stock-prices\n\tName *string `json:\"name,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n}\n```\nNewGroup defines model for NewGroup.\n\n```go\ntype Outcome string\n```\nOutcome How a delivery attempt ended. \\`lost\\` means the result is unknown: the dispatcher crashed or shut down mid-delivery, and the endpoint may have processed the request.\n\n```go\nconst (\n\tHttpError    Outcome = \"http_error\"\n\tLost         Outcome = \"lost\"\n\tNetworkError Outcome = \"network_error\"\n\tSuccess      Outcome = \"success\"\n\tTimeout      Outcome = \"timeout\"\n)\n```\nDefines values for Outcome.\n\n```go\nfunc (e Outcome) Valid() bool\n```\nValid indicates whether the value is a known member of the Outcome enum.\n\n```go\ntype OverlapPolicy string\n```\nOverlapPolicy What happens when a slot comes up while the previous run is still pending or running, or, for a schedule with \\`workflow\\`, while the workflow run it started is still running. \\`skip\\` records the slot as a \\`skipped\\` run; \\`allow\\` runs it alongside.\n\n```go\nconst (\n\tOverlapPolicyAllow OverlapPolicy = \"allow\"\n\tOverlapPolicySkip  OverlapPolicy = \"skip\"\n)\n```\nDefines values for OverlapPolicy.\n\n```go\nfunc (e OverlapPolicy) Valid() bool\n```\nValid indicates whether the value is a known member of the OverlapPolicy enum.\n\n```go\ntype PauseQueueResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Queue\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParsePauseQueueResponse(rsp *http.Response) (*PauseQueueResponse, error)\n```\nParsePauseQueueResponse parses an HTTP response from a PauseQueueWithResponse call\n\n```go\nfunc (r PauseQueueResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r PauseQueueResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r PauseQueueResponse) GetJSON200() *Queue\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r PauseQueueResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r PauseQueueResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PauseQueueResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype PauseScheduleResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Schedule\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParsePauseScheduleResponse(rsp *http.Response) (*PauseScheduleResponse, error)\n```\nParsePauseScheduleResponse parses an HTTP response from a PauseScheduleWithResponse call\n\n```go\nfunc (r PauseScheduleResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r PauseScheduleResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r PauseScheduleResponse) GetJSON200() *Schedule\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r PauseScheduleResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r PauseScheduleResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PauseScheduleResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype PreviewCronParams struct {\n\tCron string `form:\"cron\" json:\"cron\"`\n\n\t// Timezone IANA name. Defaults to UTC.\n\tTimezone *string `form:\"timezone,omitempty\" json:\"timezone,omitempty\"`\n\n\t// From The start of the window to list runs in. Requires `until`.\n\tFrom *time.Time `form:\"from,omitempty\" json:\"from,omitempty\"`\n\n\t// Until The end of the window, exclusive. Requires `from`.\n\tUntil *time.Time `form:\"until,omitempty\" json:\"until,omitempty\"`\n}\n```\nPreviewCronParams defines parameters for PreviewCron.\n\n```go\ntype PreviewCronResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *CronPreview\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParsePreviewCronResponse(rsp *http.Response) (*PreviewCronResponse, error)\n```\nParsePreviewCronResponse parses an HTTP response from a PreviewCronWithResponse call\n\n```go\nfunc (r PreviewCronResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r PreviewCronResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r PreviewCronResponse) GetJSON200() *CronPreview\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r PreviewCronResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r PreviewCronResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PreviewCronResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype PutQueueJSONRequestBody = QueueConfig\n```\nPutQueueJSONRequestBody defines body for PutQueue for application/json ContentType.\n\n```go\ntype PutQueueResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Queue\n\t// JSON201 the response for an HTTP 201 `application/json` response\n\tJSON201 *Queue\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParsePutQueueResponse(rsp *http.Response) (*PutQueueResponse, error)\n```\nParsePutQueueResponse parses an HTTP response from a PutQueueWithResponse call\n\n```go\nfunc (r PutQueueResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r PutQueueResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r PutQueueResponse) GetJSON200() *Queue\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r PutQueueResponse) GetJSON201() *Queue\n```\nGetJSON201 returns the response for an HTTP 201 \\`application/json\\` response\n\n```go\nfunc (r PutQueueResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r PutQueueResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PutQueueResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype PutScheduleJSONRequestBody = ScheduleConfig\n```\nPutScheduleJSONRequestBody defines body for PutSchedule for application/json ContentType.\n\n```go\ntype PutScheduleResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Schedule\n\t// JSON201 the response for an HTTP 201 `application/json` response\n\tJSON201 *Schedule\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParsePutScheduleResponse(rsp *http.Response) (*PutScheduleResponse, error)\n```\nParsePutScheduleResponse parses an HTTP response from a PutScheduleWithResponse call\n\n```go\nfunc (r PutScheduleResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r PutScheduleResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r PutScheduleResponse) GetJSON200() *Schedule\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r PutScheduleResponse) GetJSON201() *Schedule\n```\nGetJSON201 returns the response for an HTTP 201 \\`application/json\\` response\n\n```go\nfunc (r PutScheduleResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r PutScheduleResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PutScheduleResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype PutWorkflowJSONRequestBody = WorkflowConfig\n```\nPutWorkflowJSONRequestBody defines body for PutWorkflow for application/json ContentType.\n\n```go\ntype PutWorkflowResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Workflow\n\t// JSON201 the response for an HTTP 201 `application/json` response\n\tJSON201 *Workflow\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParsePutWorkflowResponse(rsp *http.Response) (*PutWorkflowResponse, error)\n```\nParsePutWorkflowResponse parses an HTTP response from a PutWorkflowWithResponse call\n\n```go\nfunc (r PutWorkflowResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r PutWorkflowResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r PutWorkflowResponse) GetJSON200() *Workflow\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r PutWorkflowResponse) GetJSON201() *Workflow\n```\nGetJSON201 returns the response for an HTTP 201 \\`application/json\\` response\n\n```go\nfunc (r PutWorkflowResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r PutWorkflowResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PutWorkflowResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype Queue struct {\n\t// AutoPause Pause the queue by itself when its endpoint looks down: after\n\t// `after_failures` attempts in a row end with a 5xx, a timeout or a\n\t// network error. Other 4xx responses, 429 and lost attempts don't\n\t// count, and only a success resets the count. While auto-paused, tasks\n\t// wait without using attempts, and one task at a time goes as a probe:\n\t// 30 seconds after the pause, then after twice as long each time it\n\t// fails, up to every 10 minutes. The first success resumes the queue.\n\t// Resuming it by hand does too. Omit for no auto-pause. Not for queues\n\t// whose tasks go to many endpoints, where one being down would hold up\n\t// the rest; Workly's own queues can't have it.\n\tAutoPause *AutoPauseConfig `json:\"auto_pause,omitempty\"`\n\n\t// AutoPaused The queue paused itself after failures in a row (see `auto_pause`).\n\t// Absent when it hasn't, or once it resumed.\n\tAutoPaused *AutoPaused `json:\"auto_paused,omitempty\"`\n\n\t// BackoffMultiplier Retry n waits a random time between `min_backoff_seconds` and\n\t// `min_backoff_seconds * backoff_multiplier^(n-1)`, capped at\n\t// `max_backoff_seconds`. `Retry-After` response headers are honoured.\n\tBackoffMultiplier float64   `json:\"backoff_multiplier\"`\n\tCreatedAt         time.Time `json:\"created_at\"`\n\n\t// MaxAttempts Total delivery attempts before a task fails. Tasks can override it.\n\tMaxAttempts       int     `json:\"max_attempts\"`\n\tMaxBackoffSeconds float64 `json:\"max_backoff_seconds\"`\n\n\t// MaxConcurrency Most deliveries in flight at once. There is always a limit; the\n\t// default is low so a new queue can't overwhelm its endpoint.\n\tMaxConcurrency    int     `json:\"max_concurrency\"`\n\tMinBackoffSeconds float64 `json:\"min_backoff_seconds\"`\n\tName              string  `json:\"name\"`\n\n\t// Paused Paused by hand. See `auto_paused` for a pause the queue made itself.\n\tPaused bool `json:\"paused\"`\n\n\t// RatePerSecond Most deliveries started per second. Omit for no limit. Retries\n\t// count; recovering a lost attempt does too. Deliveries are spread\n\t// out evenly: after an idle spell, at most a tenth of a second's\n\t// worth (at least 1) start at once.\n\tRatePerSecond *float64 `json:\"rate_per_second,omitempty\"`\n\n\t// RetryOn4xx Retry 4xx responses. By default only 408 and 429 are retried, as\n\t// other client errors usually fail again.\n\tRetryOn4xx bool `json:\"retry_on_4xx\"`\n\n\t// Stats The queue's current work. Returned when getting or listing queues.\n\t// Counts stop at 10,000, so 10000 means \"10,000 or more\".\n\tStats *QueueStats `json:\"stats,omitempty\"`\n\n\t// TimeoutSeconds How long to wait for a response. Tasks can override it.\n\tTimeoutSeconds float64   `json:\"timeout_seconds\"`\n\tUpdatedAt      time.Time `json:\"updated_at\"`\n}\n```\nQueue defines model for Queue.\n\n```go\ntype QueueActivity struct {\n\tCancelled int `json:\"cancelled\"`\n\n\t// DurationSamples How many latest attempts with a recorded duration the percentiles\n\t// are taken over (at most 2,000). 0 when there are no percentiles.\n\tDurationSamples int `json:\"duration_samples\"`\n\tFailed          int `json:\"failed\"`\n\n\t// P50DurationMs Median duration of the latest attempt of the succeeded and failed\n\t// tasks counted (at most the last 1,000 of each). Absent if none\n\t// has one.\n\tP50DurationMs *int `json:\"p50_duration_ms,omitempty\"`\n\n\t// P95DurationMs 95th percentile of the same durations.\n\tP95DurationMs *int `json:\"p95_duration_ms,omitempty\"`\n\n\t// RetentionSeconds How long the server keeps finished tasks (`WORKLY_RETENTION`).\n\t// Absent if it keeps them forever.\n\tRetentionSeconds *float64 `json:\"retention_seconds,omitempty\"`\n\n\t// Since The start of the period counted.\n\tSince     time.Time `json:\"since\"`\n\tSucceeded int       `json:\"succeeded\"`\n}\n```\nQueueActivity Counts stop at 10,000, so 10000 means \"10,000 or more\".\n\n```go\ntype QueueConfig struct {\n\t// AutoPause Pause the queue by itself when its endpoint looks down: after\n\t// `after_failures` attempts in a row end with a 5xx, a timeout or a\n\t// network error. Other 4xx responses, 429 and lost attempts don't\n\t// count, and only a success resets the count. While auto-paused, tasks\n\t// wait without using attempts, and one task at a time goes as a probe:\n\t// 30 seconds after the pause, then after twice as long each time it\n\t// fails, up to every 10 minutes. The first success resumes the queue.\n\t// Resuming it by hand does too. Omit for no auto-pause. Not for queues\n\t// whose tasks go to many endpoints, where one being down would hold up\n\t// the rest; Workly's own queues can't have it.\n\tAutoPause *AutoPauseConfig `json:\"auto_pause,omitempty\"`\n\n\t// BackoffMultiplier Retry n waits a random time between `min_backoff_seconds` and\n\t// `min_backoff_seconds * backoff_multiplier^(n-1)`, capped at\n\t// `max_backoff_seconds`. `Retry-After` response headers are honoured.\n\tBackoffMultiplier *float64 `json:\"backoff_multiplier,omitempty\"`\n\n\t// MaxAttempts Total delivery attempts before a task fails. Tasks can override it.\n\tMaxAttempts       *int     `json:\"max_attempts,omitempty\"`\n\tMaxBackoffSeconds *float64 `json:\"max_backoff_seconds,omitempty\"`\n\n\t// MaxConcurrency Most deliveries in flight at once. There is always a limit; the\n\t// default is low so a new queue can't overwhelm its endpoint.\n\tMaxConcurrency    *int     `json:\"max_concurrency,omitempty\"`\n\tMinBackoffSeconds *float64 `json:\"min_backoff_seconds,omitempty\"`\n\n\t// RatePerSecond Most deliveries started per second. Omit for no limit. Retries\n\t// count; recovering a lost attempt does too. Deliveries are spread\n\t// out evenly: after an idle spell, at most a tenth of a second's\n\t// worth (at least 1) start at once.\n\tRatePerSecond *float64 `json:\"rate_per_second,omitempty\"`\n\n\t// RetryOn4xx Retry 4xx responses. By default only 408 and 429 are retried, as\n\t// other client errors usually fail again.\n\tRetryOn4xx *bool `json:\"retry_on_4xx,omitempty\"`\n\n\t// TimeoutSeconds How long to wait for a response. Tasks can override it.\n\tTimeoutSeconds *float64 `json:\"timeout_seconds,omitempty\"`\n}\n```\nQueueConfig A queue's delivery policy. Omitted fields take the default.\n\n```go\ntype QueueFailures struct {\n\tGroups []FailureGroup `json:\"groups\"`\n}\n```\nQueueFailures defines model for QueueFailures.\n\n```go\ntype QueueList struct {\n\tQueues []Queue `json:\"queues\"`\n}\n```\nQueueList defines model for QueueList.\n\n```go\ntype QueueName = string\n```\nQueueName defines model for QueueName.\n\n```go\ntype QueueStats struct {\n\t// Due Pending tasks that are due now.\n\tDue int `json:\"due\"`\n\n\t// Failed Failed tasks still retained (see `WORKLY_RETENTION`). Retry them\n\t// with `POST /v1/queues/{queue}/retry-failed`.\n\tFailed int `json:\"failed\"`\n\n\t// OldestDueAt When the longest-waiting due task became due, i.e. how far behind\n\t// the queue is. Absent when nothing is due.\n\tOldestDueAt *time.Time `json:\"oldest_due_at,omitempty\"`\n\n\t// Running Tasks with a delivery in flight.\n\tRunning int `json:\"running\"`\n\n\t// Scheduled Pending tasks due later, including ones waiting to retry.\n\tScheduled int `json:\"scheduled\"`\n}\n```\nQueueStats The queue's current work. Returned when getting or listing queues. Counts stop at 10,000, so 10000 means \"10,000 or more\".\n\n```go\ntype RequestEditorFn func(ctx context.Context, req *http.Request) error\n```\nRequestEditorFn is the function signature for the RequestEditor callback function\n\n```go\ntype ResumeQueueResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Queue\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseResumeQueueResponse(rsp *http.Response) (*ResumeQueueResponse, error)\n```\nParseResumeQueueResponse parses an HTTP response from a ResumeQueueWithResponse call\n\n```go\nfunc (r ResumeQueueResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ResumeQueueResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ResumeQueueResponse) GetJSON200() *Queue\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ResumeQueueResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ResumeQueueResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ResumeQueueResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype ResumeScheduleResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Schedule\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseResumeScheduleResponse(rsp *http.Response) (*ResumeScheduleResponse, error)\n```\nParseResumeScheduleResponse parses an HTTP response from a ResumeScheduleWithResponse call\n\n```go\nfunc (r ResumeScheduleResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r ResumeScheduleResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r ResumeScheduleResponse) GetJSON200() *Schedule\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r ResumeScheduleResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r ResumeScheduleResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r ResumeScheduleResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype RetryFailedResult struct {\n\t// Retried How many failed tasks were made pending again.\n\tRetried int `json:\"retried\"`\n}\n```\nRetryFailedResult defines model for RetryFailedResult.\n\n```go\ntype RetryFailedTasksParams struct {\n\t// LastError Only tasks whose latest error is exactly this.\n\tLastError *LastError `form:\"last_error,omitempty\" json:\"last_error,omitempty\"`\n}\n```\nRetryFailedTasksParams defines parameters for RetryFailedTasks.\n\n```go\ntype RetryFailedTasksResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *RetryFailedResult\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseRetryFailedTasksResponse(rsp *http.Response) (*RetryFailedTasksResponse, error)\n```\nParseRetryFailedTasksResponse parses an HTTP response from a RetryFailedTasksWithResponse call\n\n```go\nfunc (r RetryFailedTasksResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r RetryFailedTasksResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r RetryFailedTasksResponse) GetJSON200() *RetryFailedResult\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r RetryFailedTasksResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r RetryFailedTasksResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r RetryFailedTasksResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype RetryRunResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Run\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseRetryRunResponse(rsp *http.Response) (*RetryRunResponse, error)\n```\nParseRetryRunResponse parses an HTTP response from a RetryRunWithResponse call\n\n```go\nfunc (r RetryRunResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r RetryRunResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r RetryRunResponse) GetJSON200() *Run\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r RetryRunResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r RetryRunResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r RetryRunResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype RetryTaskResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *Task\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseRetryTaskResponse(rsp *http.Response) (*RetryTaskResponse, error)\n```\nParseRetryTaskResponse parses an HTTP response from a RetryTaskWithResponse call\n\n```go\nfunc (r RetryTaskResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r RetryTaskResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r RetryTaskResponse) GetJSON200() *Task\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r RetryTaskResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r RetryTaskResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r RetryTaskResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype RetryWorkflowRunResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *WorkflowRun\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseRetryWorkflowRunResponse(rsp *http.Response) (*RetryWorkflowRunResponse, error)\n```\nParseRetryWorkflowRunResponse parses an HTTP response from a RetryWorkflowRunWithResponse call\n\n```go\nfunc (r RetryWorkflowRunResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r RetryWorkflowRunResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r RetryWorkflowRunResponse) GetJSON200() *WorkflowRun\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r RetryWorkflowRunResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r RetryWorkflowRunResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r RetryWorkflowRunResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype Run struct {\n\tAttemptCount int `json:\"attempt_count\"`\n\n\t// Body The body, when it is not JSON.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// CallbackState A `pending` task with `run_at` in the future is scheduled. A `failed`\n\t// task has exhausted its attempts or got a non-retryable response.\n\tCallbackState *TaskState `json:\"callback_state,omitempty\"`\n\n\t// CallbackTaskId The callback task enqueued when the run last finished, if its schedule has `on_complete`.\n\tCallbackTaskId *string   `json:\"callback_task_id,omitempty\"`\n\tCreatedAt      time.Time `json:\"created_at\"`\n\n\t// FinishedAt When the run succeeded, failed, was cancelled or was skipped.\n\tFinishedAt *time.Time        `json:\"finished_at,omitempty\"`\n\tHeaders    map[string]string `json:\"headers\"`\n\n\t// Id Example: run_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId            string     `json:\"id\"`\n\tLastAttemptAt *time.Time `json:\"last_attempt_at,omitempty\"`\n\n\t// LastDurationMs How long the latest finished attempt took. Absent before the first attempt finishes.\n\tLastDurationMs *int    `json:\"last_duration_ms,omitempty\"`\n\tLastError      *string `json:\"last_error,omitempty\"`\n\n\t// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tLastOutcome *Outcome `json:\"last_outcome,omitempty\"`\n\n\t// LastStatus HTTP status of the latest attempt, if it got a response.\n\tLastStatus *int       `json:\"last_status,omitempty\"`\n\tMethod     HTTPMethod `json:\"method\"`\n\n\t// Payload The body, when it is JSON.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\n\t// RetriedAt When the run was last retried by hand. Absent if never.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\n\t// RunAt When the run is next eligible for delivery.\n\tRunAt    time.Time `json:\"run_at\"`\n\tSchedule string    `json:\"schedule\"`\n\n\t// ScheduledFor The cron slot, or when a manual run was triggered. Sent as `Workly-Scheduled-For`.\n\tScheduledFor time.Time `json:\"scheduled_for\"`\n\n\t// SkipReason `overlap`: the previous run, or the workflow run it started, was\n\t// still going (overlap policy `skip`). `missed`: the server was down at the slot (missed\n\t// policy `skip`).\n\tSkipReason *SkipReason `json:\"skip_reason,omitempty\"`\n\n\t// StartedAt When the first delivery attempt started. Retries by hand don't change it. Absent before the first attempt.\n\tStartedAt *time.Time `json:\"started_at,omitempty\"`\n\n\t// State A `skipped` run was never delivered: see `skip_reason`. It can be\n\t// retried to deliver it now.\n\tState RunState `json:\"state\"`\n\n\t// Trigger `schedule` for a cron slot, `manual` for \"run now\".\n\tTrigger   RunTrigger `json:\"trigger\"`\n\tUpdatedAt time.Time  `json:\"updated_at\"`\n\tUrl       string     `json:\"url\"`\n\n\t// WorkflowRunId The workflow run this run started, for a schedule that starts a workflow.\n\tWorkflowRunId     *string            `json:\"workflow_run_id,omitempty\"`\n\tWorkflowRunStatus *WorkflowRunStatus `json:\"workflow_run_status,omitempty\"`\n}\n```\nRun defines model for Run.\n\n```go\ntype RunID = string\n```\nRunID defines model for RunID.\n\n```go\ntype RunList struct {\n\t// NextCursor Pass as `cursor` to get the next page. Absent on the last page.\n\tNextCursor *string `json:\"next_cursor,omitempty\"`\n\tRuns       []Run   `json:\"runs\"`\n}\n```\nRunList defines model for RunList.\n\n```go\ntype RunState string\n```\nRunState A \\`skipped\\` run was never delivered: see \\`skip\\_reason\\`. It can be retried to deliver it now.\n\n```go\nconst (\n\tRunStateCancelled RunState = \"cancelled\"\n\tRunStateFailed    RunState = \"failed\"\n\tRunStatePending   RunState = \"pending\"\n\tRunStateRunning   RunState = \"running\"\n\tRunStateSkipped   RunState = \"skipped\"\n\tRunStateSucceeded RunState = \"succeeded\"\n)\n```\nDefines values for RunState.\n\n```go\nfunc (e RunState) Valid() bool\n```\nValid indicates whether the value is a known member of the RunState enum.\n\n```go\ntype RunSummary struct {\n\tAttemptCount int       `json:\"attempt_count\"`\n\tFinishedAt   time.Time `json:\"finished_at\"`\n\tLastError    *string   `json:\"last_error,omitempty\"`\n\n\t// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tLastOutcome  *Outcome  `json:\"last_outcome,omitempty\"`\n\tLastStatus   *int      `json:\"last_status,omitempty\"`\n\tRunId        string    `json:\"run_id\"`\n\tSchedule     string    `json:\"schedule\"`\n\tScheduledFor time.Time `json:\"scheduled_for\"`\n\n\t// State A `skipped` run was never delivered: see `skip_reason`. It can be\n\t// retried to deliver it now.\n\tState RunState `json:\"state\"`\n\n\t// Trigger `schedule` for a cron slot, `manual` for \"run now\".\n\tTrigger RunTrigger `json:\"trigger\"`\n}\n```\nRunSummary The body of a schedule's callback.\n\n```go\ntype RunTrigger string\n```\nRunTrigger \\`schedule\\` for a cron slot, \\`manual\\` for \"run now\".\n\n```go\nconst (\n\tRunTriggerManual   RunTrigger = \"manual\"\n\tRunTriggerSchedule RunTrigger = \"schedule\"\n)\n```\nDefines values for RunTrigger.\n\n```go\nfunc (e RunTrigger) Valid() bool\n```\nValid indicates whether the value is a known member of the RunTrigger enum.\n\n```go\ntype Schedule struct {\n\tBackoffMultiplier float64 `json:\"backoff_multiplier\"`\n\n\t// Body The body, when it is not JSON.\n\tBody      *string           `json:\"body,omitempty\"`\n\tCreatedAt time.Time         `json:\"created_at\"`\n\tCron      string            `json:\"cron\"`\n\tHeaders   map[string]string `json:\"headers\"`\n\n\t// LastRun The schedule's most recent run. Absent before the first.\n\tLastRun           *LastRun   `json:\"last_run,omitempty\"`\n\tMaxAttempts       int        `json:\"max_attempts\"`\n\tMaxBackoffSeconds float64    `json:\"max_backoff_seconds\"`\n\tMethod            HTTPMethod `json:\"method\"`\n\tMinBackoffSeconds float64    `json:\"min_backoff_seconds\"`\n\n\t// Missed What happens to slots missed while the server was down (a slot is\n\t// missed if it can't fire within a minute). `skip` records the most\n\t// recent missed slot as a `skipped` run; `catch_up` runs it. Either\n\t// way, at most one run is created for the missed slots.\n\tMissed MissedPolicy `json:\"missed\"`\n\tName   string       `json:\"name\"`\n\n\t// NextRunAt When the schedule next fires. Absent while paused.\n\tNextRunAt *time.Time `json:\"next_run_at,omitempty\"`\n\n\t// NextRuns The next five slots. Empty while paused; see `next_runs_if_resumed`.\n\tNextRuns []time.Time `json:\"next_runs\"`\n\n\t// NextRunsIfResumed While paused, the five slots the schedule would run at if resumed\n\t// now, to check its cron expression. Absent while it runs.\n\tNextRunsIfResumed *[]time.Time `json:\"next_runs_if_resumed,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Overlap What happens when a slot comes up while the previous run is still\n\t// pending or running, or, for a schedule with `workflow`, while the\n\t// workflow run it started is still running. `skip` records the slot as\n\t// a `skipped` run; `allow` runs it alongside.\n\tOverlap OverlapPolicy `json:\"overlap\"`\n\tPaused  bool          `json:\"paused\"`\n\n\t// PausedAt When a paused schedule was paused. Absent while it runs.\n\tPausedAt *time.Time `json:\"paused_at,omitempty\"`\n\n\t// Payload The body, when it is JSON.\n\tPayload        *json.RawMessage `json:\"payload,omitempty\"`\n\tRetryOn4xx     bool             `json:\"retry_on_4xx\"`\n\tTimeoutSeconds float64          `json:\"timeout_seconds\"`\n\tTimezone       string           `json:\"timezone\"`\n\tUpdatedAt      time.Time        `json:\"updated_at\"`\n\tUrl            string           `json:\"url\"`\n\n\t// Workflow The workflow each run starts, for a schedule that starts one. `url` is then empty.\n\tWorkflow *string `json:\"workflow,omitempty\"`\n}\n```\nSchedule defines model for Schedule.\n\n```go\ntype ScheduleConfig struct {\n\t// BackoffMultiplier Retries back off as for queues (see `QueueConfig`).\n\tBackoffMultiplier *float64 `json:\"backoff_multiplier,omitempty\"`\n\n\t// Body A raw text body. Use this or `payload`.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// ContentType Content type of `body`. Defaults to `text/plain; charset=utf-8`.\n\tContentType *string `json:\"content_type,omitempty\"`\n\n\t// Cron When to run: five fields (minute, hour, day of month, month, day\n\t// of week) with `*`, lists, ranges, steps and names (`jan`, `mon`),\n\t// or `@yearly`, `@monthly`, `@weekly`, `@daily` or `@hourly`. When\n\t// both day fields are restricted, a day matches either.\n\t//\n\t//\n\t// Example: 0 3 * * *\n\tCron string `json:\"cron\"`\n\n\t// Headers Headers sent with every run. `Workly-*` headers are reserved.\n\tHeaders *map[string]string `json:\"headers,omitempty\"`\n\n\t// MaxAttempts Total delivery attempts before a run fails.\n\tMaxAttempts       *int        `json:\"max_attempts,omitempty\"`\n\tMaxBackoffSeconds *float64    `json:\"max_backoff_seconds,omitempty\"`\n\tMethod            *HTTPMethod `json:\"method,omitempty\"`\n\tMinBackoffSeconds *float64    `json:\"min_backoff_seconds,omitempty\"`\n\n\t// Missed What happens to slots missed while the server was down (a slot is\n\t// missed if it can't fire within a minute). `skip` records the most\n\t// recent missed slot as a `skipped` run; `catch_up` runs it. Either\n\t// way, at most one run is created for the missed slots.\n\tMissed *MissedPolicy `json:\"missed,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Overlap What happens when a slot comes up while the previous run is still\n\t// pending or running, or, for a schedule with `workflow`, while the\n\t// workflow run it started is still running. `skip` records the slot as\n\t// a `skipped` run; `allow` runs it alongside.\n\tOverlap *OverlapPolicy `json:\"overlap,omitempty\"`\n\n\t// Payload A JSON body, sent with `Content-Type: application/json`. Use this or `body`.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\n\t// RetryOn4xx Retry 4xx responses. By default only 408 and 429 are retried.\n\tRetryOn4xx *bool `json:\"retry_on_4xx,omitempty\"`\n\n\t// TimeoutSeconds How long to wait for a response.\n\tTimeoutSeconds *float64 `json:\"timeout_seconds,omitempty\"`\n\n\t// Timezone IANA timezone the cron expression is read in, e.g.\n\t// `Europe/Stockholm`. A slot in the hour skipped by a daylight\n\t// saving change runs right after it; a slot in a repeated hour runs\n\t// once.\n\tTimezone *string `json:\"timezone,omitempty\"`\n\n\t// Url The http(s) URL to call. Use this or `workflow`.\n\t//\n\t// Example: https://api.example.com/reports/nightly\n\tUrl *string `json:\"url,omitempty\"`\n\n\t// Workflow A workflow to start a run of instead of calling a URL. The\n\t// `payload`, if any, is the run's `input`; `method`, `headers` and\n\t// `body` don't apply. Each run's attempt starts the workflow run\n\t// (`workflow_run_id`), which then goes on independently: the run\n\t// succeeding means the workflow started, not that it succeeded.\n\t//\n\t//\n\t// Example: daily-refresh\n\tWorkflow *string `json:\"workflow,omitempty\"`\n}\n```\nScheduleConfig A schedule's settings. Omitted fields take the default. The request fields (\\`url\\` to \\`content\\_type\\`) work as in \\`EnqueueRequest\\`. Set \\`url\\` to call an endpoint, or \\`workflow\\` to start a run of that workflow instead.\n\n```go\ntype ScheduleList struct {\n\tSchedules []Schedule `json:\"schedules\"`\n}\n```\nScheduleList defines model for ScheduleList.\n\n```go\ntype ScheduleName = string\n```\nScheduleName defines model for ScheduleName.\n\n```go\ntype SearchTasksParams struct {\n\tQueue          *string    `form:\"queue,omitempty\" json:\"queue,omitempty\"`\n\tState          *TaskState `form:\"state,omitempty\" json:\"state,omitempty\"`\n\tIdempotencyKey *string    `form:\"idempotency_key,omitempty\" json:\"idempotency_key,omitempty\"`\n\n\t// GroupId Only the tasks of this group.\n\tGroupId *string `form:\"group_id,omitempty\" json:\"group_id,omitempty\"`\n\n\t// LastError Only tasks whose latest error is exactly this.\n\tLastError *LastError `form:\"last_error,omitempty\" json:\"last_error,omitempty\"`\n\n\t// CreatedAfter Only tasks created at or after this time.\n\tCreatedAfter *time.Time `form:\"created_after,omitempty\" json:\"created_after,omitempty\"`\n\n\t// CreatedBefore Only tasks created before this time.\n\tCreatedBefore *time.Time `form:\"created_before,omitempty\" json:\"created_before,omitempty\"`\n\n\t// Sort What to order tasks by:\n\t//\n\t// - `created_at` (the default): when the task was enqueued.\n\t// - `run_at`: when it runs next. Pending tasks are delivered in this\n\t//   order, so ascending lists them as they'll run.\n\t// - `last_attempt_at`: when its latest attempt finished. Tasks never\n\t//   attempted count as oldest.\n\t// - `attempt_count`: how many attempts it has had.\n\t//\n\t// Ties are broken by task ID.\n\tSort *SearchTasksParamsSort `form:\"sort,omitempty\" json:\"sort,omitempty\"`\n\n\t// Order `asc` or `desc`. Defaults to `asc` (soonest first) for `run_at` and\n\t// to `desc` (newest or most first) for the rest.\n\tOrder *SearchTasksParamsOrder `form:\"order,omitempty\" json:\"order,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nSearchTasksParams defines parameters for SearchTasks.\n\n```go\ntype SearchTasksParamsOrder string\n```\nSearchTasksParamsOrder defines parameters for SearchTasks.\n\n```go\nconst (\n\tSearchTasksParamsOrderAsc  SearchTasksParamsOrder = \"asc\"\n\tSearchTasksParamsOrderDesc SearchTasksParamsOrder = \"desc\"\n)\n```\nDefines values for SearchTasksParamsOrder.\n\n```go\nfunc (e SearchTasksParamsOrder) Valid() bool\n```\nValid indicates whether the value is a known member of the SearchTasksParamsOrder enum.\n\n```go\ntype SearchTasksParamsSort string\n```\nSearchTasksParamsSort defines parameters for SearchTasks.\n\n```go\nconst (\n\tSearchTasksParamsSortAttemptCount  SearchTasksParamsSort = \"attempt_count\"\n\tSearchTasksParamsSortCreatedAt     SearchTasksParamsSort = \"created_at\"\n\tSearchTasksParamsSortLastAttemptAt SearchTasksParamsSort = \"last_attempt_at\"\n\tSearchTasksParamsSortRunAt         SearchTasksParamsSort = \"run_at\"\n)\n```\nDefines values for SearchTasksParamsSort.\n\n```go\nfunc (e SearchTasksParamsSort) Valid() bool\n```\nValid indicates whether the value is a known member of the SearchTasksParamsSort enum.\n\n```go\ntype SearchTasksResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *TaskList\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseSearchTasksResponse(rsp *http.Response) (*SearchTasksResponse, error)\n```\nParseSearchTasksResponse parses an HTTP response from a SearchTasksWithResponse call\n\n```go\nfunc (r SearchTasksResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r SearchTasksResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r SearchTasksResponse) GetJSON200() *TaskList\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r SearchTasksResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r SearchTasksResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r SearchTasksResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype SkipReason string\n```\nSkipReason \\`overlap\\`: the previous run, or the workflow run it started, was still going (overlap policy \\`skip\\`). \\`missed\\`: the server was down at the slot (missed policy \\`skip\\`).\n\n```go\nconst (\n\tMissed  SkipReason = \"missed\"\n\tOverlap SkipReason = \"overlap\"\n)\n```\nDefines values for SkipReason.\n\n```go\nfunc (e SkipReason) Valid() bool\n```\nValid indicates whether the value is a known member of the SkipReason enum.\n\n```go\ntype SortOrder string\n```\nSortOrder defines model for SortOrder.\n\n```go\nconst (\n\tSortOrderAsc  SortOrder = \"asc\"\n\tSortOrderDesc SortOrder = \"desc\"\n)\n```\nDefines values for SortOrder.\n\n```go\nfunc (e SortOrder) Valid() bool\n```\nValid indicates whether the value is a known member of the SortOrder enum.\n\n```go\ntype StartWorkflowRun struct {\n\t// IdempotencyKey Deduplicates runs of the workflow.\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// Input JSON passed to every step that has no body of its own.\n\tInput *json.RawMessage `json:\"input,omitempty\"`\n}\n```\nStartWorkflowRun defines model for StartWorkflowRun.\n\n```go\ntype StartWorkflowRunJSONRequestBody = StartWorkflowRun\n```\nStartWorkflowRunJSONRequestBody defines body for StartWorkflowRun for application/json ContentType.\n\n```go\ntype StartWorkflowRunResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON200 the response for an HTTP 200 `application/json` response\n\tJSON200 *WorkflowRun\n\t// JSON201 the response for an HTTP 201 `application/json` response\n\tJSON201 *WorkflowRun\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseStartWorkflowRunResponse(rsp *http.Response) (*StartWorkflowRunResponse, error)\n```\nParseStartWorkflowRunResponse parses an HTTP response from a StartWorkflowRunWithResponse call\n\n```go\nfunc (r StartWorkflowRunResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r StartWorkflowRunResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r StartWorkflowRunResponse) GetJSON200() *WorkflowRun\n```\nGetJSON200 returns the response for an HTTP 200 \\`application/json\\` response\n\n```go\nfunc (r StartWorkflowRunResponse) GetJSON201() *WorkflowRun\n```\nGetJSON201 returns the response for an HTTP 201 \\`application/json\\` response\n\n```go\nfunc (r StartWorkflowRunResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r StartWorkflowRunResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r StartWorkflowRunResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype StepStatus string\n```\nStepStatus \\`blocked\\` waits for its dependencies; \\`pending\\` has its task enqueued (or retrying); \\`running\\` is being delivered; \\`waiting\\` succeeded and waits for the resource its response named in \\`Workly-Wait-For\\`; \\`skipped\\` never ran, or stopped waiting, because the run stopped.\n\n```go\nconst (\n\tStepStatusBlocked   StepStatus = \"blocked\"\n\tStepStatusFailed    StepStatus = \"failed\"\n\tStepStatusPending   StepStatus = \"pending\"\n\tStepStatusRunning   StepStatus = \"running\"\n\tStepStatusSkipped   StepStatus = \"skipped\"\n\tStepStatusSucceeded StepStatus = \"succeeded\"\n\tStepStatusWaiting   StepStatus = \"waiting\"\n)\n```\nDefines values for StepStatus.\n\n```go\nfunc (e StepStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the StepStatus enum.\n\n```go\ntype Task struct {\n\tAttemptCount int `json:\"attempt_count\"`\n\n\t// Body The body, when it is not JSON.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// CallbackTaskId The callback task enqueued when the task last finished, if it has `on_complete`.\n\tCallbackTaskId *string   `json:\"callback_task_id,omitempty\"`\n\tCreatedAt      time.Time `json:\"created_at\"`\n\n\t// FinishedAt When the task succeeded, failed or was cancelled.\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// GroupId The group the task belongs to, if any.\n\tGroupId *string           `json:\"group_id,omitempty\"`\n\tHeaders map[string]string `json:\"headers\"`\n\n\t// Id Example: task_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId             string  `json:\"id\"`\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// LastAttemptAt When the latest attempt finished. Absent before the first attempt.\n\tLastAttemptAt *time.Time `json:\"last_attempt_at,omitempty\"`\n\n\t// LastDurationMs How long the latest finished attempt took. Absent before the first attempt finishes.\n\tLastDurationMs *int    `json:\"last_duration_ms,omitempty\"`\n\tLastError      *string `json:\"last_error,omitempty\"`\n\n\t// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tLastOutcome *Outcome `json:\"last_outcome,omitempty\"`\n\n\t// LastStatus HTTP status of the latest attempt, if it got a response.\n\tLastStatus *int `json:\"last_status,omitempty\"`\n\n\t// MaxAttempts Per-task override, if set.\n\tMaxAttempts *int       `json:\"max_attempts,omitempty\"`\n\tMethod      HTTPMethod `json:\"method\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Payload The body, when it is JSON.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\tQueue   string           `json:\"queue\"`\n\n\t// RetriedAt When the task was last retried by hand (`POST /v1/tasks/{id}/retry`\n\t// or `POST /v1/queues/{queue}/retry-failed`). Absent if never.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\n\t// RunAt When the task is next eligible for delivery.\n\tRunAt time.Time `json:\"run_at\"`\n\n\t// StartedAt When the first delivery attempt started; `started_at` minus\n\t// `created_at` is how long the task waited in the queue. Retries by\n\t// hand don't change it. Absent before the first attempt.\n\tStartedAt *time.Time `json:\"started_at,omitempty\"`\n\n\t// State A `pending` task with `run_at` in the future is scheduled. A `failed`\n\t// task has exhausted its attempts or got a non-retryable response.\n\tState TaskState `json:\"state\"`\n\n\t// TimeoutSeconds Per-task override, if set.\n\tTimeoutSeconds *float64  `json:\"timeout_seconds,omitempty\"`\n\tUpdatedAt      time.Time `json:\"updated_at\"`\n\tUrl            string    `json:\"url\"`\n\n\t// WorkflowStep The workflow step a task delivers, if it is one. A step's task can't be\n\t// retried on its own: retry its workflow run instead.\n\tWorkflowStep *TaskWorkflowStep `json:\"workflow_step,omitempty\"`\n}\n```\nTask defines model for Task.\n\n```go\ntype TaskID = string\n```\nTaskID defines model for TaskID.\n\n```go\ntype TaskList struct {\n\t// NextCursor Pass as `cursor` to get the next page. Absent on the last page.\n\tNextCursor *string `json:\"next_cursor,omitempty\"`\n\tTasks      []Task  `json:\"tasks\"`\n}\n```\nTaskList defines model for TaskList.\n\n```go\ntype TaskSort string\n```\nTaskSort defines model for TaskSort.\n\n```go\nconst (\n\tTaskSortAttemptCount  TaskSort = \"attempt_count\"\n\tTaskSortCreatedAt     TaskSort = \"created_at\"\n\tTaskSortLastAttemptAt TaskSort = \"last_attempt_at\"\n\tTaskSortRunAt         TaskSort = \"run_at\"\n)\n```\nDefines values for TaskSort.\n\n```go\nfunc (e TaskSort) Valid() bool\n```\nValid indicates whether the value is a known member of the TaskSort enum.\n\n```go\ntype TaskState string\n```\nTaskState A \\`pending\\` task with \\`run\\_at\\` in the future is scheduled. A \\`failed\\` task has exhausted its attempts or got a non-retryable response.\n\n```go\nconst (\n\tTaskStateCancelled TaskState = \"cancelled\"\n\tTaskStateFailed    TaskState = \"failed\"\n\tTaskStatePending   TaskState = \"pending\"\n\tTaskStateRunning   TaskState = \"running\"\n\tTaskStateSucceeded TaskState = \"succeeded\"\n)\n```\nDefines values for TaskState.\n\n```go\nfunc (e TaskState) Valid() bool\n```\nValid indicates whether the value is a known member of the TaskState enum.\n\n```go\ntype TaskSummary struct {\n\tAttemptCount   int       `json:\"attempt_count\"`\n\tFinishedAt     time.Time `json:\"finished_at\"`\n\tGroupId        *string   `json:\"group_id,omitempty\"`\n\tIdempotencyKey *string   `json:\"idempotency_key,omitempty\"`\n\tLastError      *string   `json:\"last_error,omitempty\"`\n\n\t// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tLastOutcome *Outcome `json:\"last_outcome,omitempty\"`\n\n\t// LastStatus HTTP status of the latest attempt, if it got a response.\n\tLastStatus *int   `json:\"last_status,omitempty\"`\n\tQueue      string `json:\"queue\"`\n\n\t// State A `pending` task with `run_at` in the future is scheduled. A `failed`\n\t// task has exhausted its attempts or got a non-retryable response.\n\tState  TaskState `json:\"state\"`\n\tTaskId string    `json:\"task_id\"`\n}\n```\nTaskSummary The body of a task's callback.\n\n```go\ntype TaskWorkflowStep struct {\n\t// Id The step, `wfs_…`.\n\t//\n\t// Example: wfs_01M7AH8EPATE4EPK37FWTA5TBQ\n\tId string `json:\"id\"`\n\n\t// Name The step's name in its workflow.\n\tName string `json:\"name\"`\n\n\t// RunId The workflow run, `wfr_…`.\n\t//\n\t// Example: wfr_01M7AH8EP90ZQ4E9228337GGVR\n\tRunId    string `json:\"run_id\"`\n\tWorkflow string `json:\"workflow\"`\n}\n```\nTaskWorkflowStep The workflow step a task delivers, if it is one. A step's task can't be retried on its own: retry its workflow run instead.\n\n```go\ntype TestAlertChannelResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseTestAlertChannelResponse(rsp *http.Response) (*TestAlertChannelResponse, error)\n```\nParseTestAlertChannelResponse parses an HTTP response from a TestAlertChannelWithResponse call\n\n```go\nfunc (r TestAlertChannelResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r TestAlertChannelResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r TestAlertChannelResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r TestAlertChannelResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r TestAlertChannelResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype TriggerScheduleResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n\t// JSON201 the response for an HTTP 201 `application/json` response\n\tJSON201 *Run\n\t// JSONDefault the response for an HTTP default `application/json` response\n\tJSONDefault *Error\n}\n```\n\n```go\nfunc ParseTriggerScheduleResponse(rsp *http.Response) (*TriggerScheduleResponse, error)\n```\nParseTriggerScheduleResponse parses an HTTP response from a TriggerScheduleWithResponse call\n\n```go\nfunc (r TriggerScheduleResponse) ContentType() string\n```\nContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers\n\n```go\nfunc (r TriggerScheduleResponse) GetBody() []byte\n```\nGetBody returns the raw response body bytes\n\n```go\nfunc (r TriggerScheduleResponse) GetJSON201() *Run\n```\nGetJSON201 returns the response for an HTTP 201 \\`application/json\\` response\n\n```go\nfunc (r TriggerScheduleResponse) GetJSONDefault() *Error\n```\nGetJSONDefault returns the response for an HTTP default \\`application/json\\` response\n\n```go\nfunc (r TriggerScheduleResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r TriggerScheduleResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype WaitFor struct {\n\tId   string      `json:\"id\"`\n\tType WaitForType `json:\"type\"`\n}\n```\nWaitFor The resource a step handed its completion to.\n\n```go\ntype WaitForType string\n```\nWaitForType defines model for WaitFor.Type.\n\n```go\nconst (\n\tWaitForTypeGroup WaitForType = \"group\"\n)\n```\nDefines values for WaitForType.\n\n```go\nfunc (e WaitForType) Valid() bool\n```\nValid indicates whether the value is a known member of the WaitForType enum.\n\n```go\ntype Workflow struct {\n\tCreatedAt          time.Time            `json:\"created_at\"`\n\tLastRun            *WorkflowRunSummary  `json:\"last_run,omitempty\"`\n\tMaxDurationSeconds float64              `json:\"max_duration_seconds\"`\n\tName               string               `json:\"name\"`\n\tSteps              []WorkflowStepConfig `json:\"steps\"`\n\tUpdatedAt          time.Time            `json:\"updated_at\"`\n\n\t// Version Counts changes to the definition, from 1.\n\tVersion int `json:\"version\"`\n}\n```\nWorkflow defines model for Workflow.\n\n```go\ntype WorkflowConfig struct {\n\t// MaxDurationSeconds How long a run may take. A run still going after it fails, and a\n\t// step still waiting fails with it.\n\tMaxDurationSeconds *float64 `json:\"max_duration_seconds,omitempty\"`\n\n\t// Steps The steps, which must form a DAG.\n\tSteps []WorkflowStepConfig `json:\"steps\"`\n}\n```\nWorkflowConfig defines model for WorkflowConfig.\n\n```go\ntype WorkflowList struct {\n\tWorkflows []Workflow `json:\"workflows\"`\n}\n```\nWorkflowList defines model for WorkflowList.\n\n```go\ntype WorkflowName = string\n```\nWorkflowName defines model for WorkflowName.\n\n```go\ntype WorkflowRun struct {\n\t// Attempt 1, plus one for each time the run was retried. Steps are sent it\n\t// as `Workly-Workflow-Run-Attempt`.\n\tAttempt   int       `json:\"attempt\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\n\t// DeadlineAt When a run still going fails (`max_duration_seconds`).\n\tDeadlineAt *time.Time `json:\"deadline_at,omitempty\"`\n\n\t// DurationMs From start to finish, or to now while running.\n\tDurationMs *int `json:\"duration_ms,omitempty\"`\n\n\t// Error Why the run failed or was cancelled.\n\tError      *string    `json:\"error,omitempty\"`\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// Id Example: wfr_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId             string           `json:\"id\"`\n\tIdempotencyKey *string          `json:\"idempotency_key,omitempty\"`\n\tInput          *json.RawMessage `json:\"input,omitempty\"`\n\n\t// RetriedAt When the run was last retried. Absent if never.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\n\t// ScheduleRunId The schedule run that started it, if any.\n\tScheduleRunId *string           `json:\"schedule_run_id,omitempty\"`\n\tStatus        WorkflowRunStatus `json:\"status\"`\n\n\t// Steps In definition order.\n\tSteps    []WorkflowStep `json:\"steps\"`\n\tVersion  int            `json:\"version\"`\n\tWorkflow string         `json:\"workflow\"`\n}\n```\nWorkflowRun defines model for WorkflowRun.\n\n```go\ntype WorkflowRunID = string\n```\nWorkflowRunID defines model for WorkflowRunID.\n\n```go\ntype WorkflowRunList struct {\n\t// NextCursor Pass as `cursor` to get the next page. Absent on the last page.\n\tNextCursor   *string              `json:\"next_cursor,omitempty\"`\n\tWorkflowRuns []WorkflowRunSummary `json:\"workflow_runs\"`\n}\n```\nWorkflowRunList defines model for WorkflowRunList.\n\n```go\ntype WorkflowRunStatus string\n```\nWorkflowRunStatus defines model for WorkflowRunStatus.\n\n```go\nconst (\n\tWorkflowRunStatusCancelled WorkflowRunStatus = \"cancelled\"\n\tWorkflowRunStatusFailed    WorkflowRunStatus = \"failed\"\n\tWorkflowRunStatusRunning   WorkflowRunStatus = \"running\"\n\tWorkflowRunStatusSucceeded WorkflowRunStatus = \"succeeded\"\n)\n```\nDefines values for WorkflowRunStatus.\n\n```go\nfunc (e WorkflowRunStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the WorkflowRunStatus enum.\n\n```go\ntype WorkflowRunSummary struct {\n\t// Attempt 1, plus one for each time the run was retried. Steps are sent it\n\t// as `Workly-Workflow-Run-Attempt`.\n\tAttempt   int       `json:\"attempt\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\n\t// DeadlineAt When a run still going fails (`max_duration_seconds`).\n\tDeadlineAt *time.Time `json:\"deadline_at,omitempty\"`\n\n\t// DurationMs From start to finish, or to now while running.\n\tDurationMs *int `json:\"duration_ms,omitempty\"`\n\n\t// Error Why the run failed or was cancelled.\n\tError      *string    `json:\"error,omitempty\"`\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// Id Example: wfr_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId             string  `json:\"id\"`\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// RetriedAt When the run was last retried. Absent if never.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\n\t// ScheduleRunId The schedule run that started it, if any.\n\tScheduleRunId *string           `json:\"schedule_run_id,omitempty\"`\n\tStatus        WorkflowRunStatus `json:\"status\"`\n\tVersion       int               `json:\"version\"`\n\tWorkflow      string            `json:\"workflow\"`\n}\n```\nWorkflowRunSummary defines model for WorkflowRunSummary.\n\n```go\ntype WorkflowStep struct {\n\t// BlockedBy Dependencies that haven't succeeded yet.\n\tBlockedBy []string `json:\"blocked_by\"`\n\n\t// BlockedMs Time spent waiting for dependencies.\n\tBlockedMs *int       `json:\"blocked_ms,omitempty\"`\n\tCreatedAt *time.Time `json:\"created_at,omitempty\"`\n\tDependsOn []string   `json:\"depends_on\"`\n\n\t// DurationMs From its task being enqueued to the step finishing (or now).\n\tDurationMs *int       `json:\"duration_ms,omitempty\"`\n\tError      *string    `json:\"error,omitempty\"`\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// HttpDoneAt When its request succeeded.\n\tHttpDoneAt *time.Time `json:\"http_done_at,omitempty\"`\n\n\t// Id Example: wfs_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId   string `json:\"id\"`\n\tName string `json:\"name\"`\n\n\t// ReadyAt When its task was enqueued.\n\tReadyAt *time.Time `json:\"ready_at,omitempty\"`\n\n\t// Status `blocked` waits for its dependencies; `pending` has its task\n\t// enqueued (or retrying); `running` is being delivered; `waiting`\n\t// succeeded and waits for the resource its response named in\n\t// `Workly-Wait-For`; `skipped` never ran, or stopped waiting, because\n\t// the run stopped.\n\tStatus StepStatus `json:\"status\"`\n\n\t// Task The step's task, which records its attempts.\n\tTask   *WorkflowStepTask `json:\"task,omitempty\"`\n\tTaskId *string           `json:\"task_id,omitempty\"`\n\n\t// WaitFor The resource a step handed its completion to.\n\tWaitFor *WaitFor `json:\"wait_for,omitempty\"`\n\n\t// WaitingMs Time spent waiting for the `wait_for` resource.\n\tWaitingMs *int `json:\"waiting_ms,omitempty\"`\n}\n```\nWorkflowStep defines model for WorkflowStep.\n\n```go\ntype WorkflowStepConfig struct {\n\t// Body A raw text body. Use this or `payload`.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// ContentType Content type of `body`. Defaults to `text/plain; charset=utf-8`.\n\tContentType *string `json:\"content_type,omitempty\"`\n\n\t// DependsOn Steps that must succeed before this one starts.\n\tDependsOn *[]string `json:\"depends_on,omitempty\"`\n\n\t// Headers `Workly-*` headers are reserved.\n\tHeaders *map[string]string `json:\"headers,omitempty\"`\n\n\t// MaxAttempts Overrides the queue's max attempts.\n\tMaxAttempts *int        `json:\"max_attempts,omitempty\"`\n\tMethod      *HTTPMethod `json:\"method,omitempty\"`\n\n\t// Name Unique within the workflow. Lowercase letters, digits, `-` and `_`; at most 64 characters.\n\t//\n\t// Example: prices\n\tName string `json:\"name\"`\n\n\t// Payload A JSON body, sent with `Content-Type: application/json`. Use this or `body`.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\n\t// Queue The queue the step's task goes to, for its retry policy, timeout\n\t// and rate and concurrency limits. `_workflows` is created on\n\t// demand; another queue must exist when the step starts.\n\tQueue *string `json:\"queue,omitempty\"`\n\n\t// TimeoutSeconds Overrides the queue's timeout.\n\tTimeoutSeconds *float64 `json:\"timeout_seconds,omitempty\"`\n\n\t// Url Example: https://api.example.com/jobs/prices\n\tUrl string `json:\"url\"`\n}\n```\nWorkflowStepConfig A step: an HTTP request, sent as a task once every step in \\`depends\\_on\\` has succeeded. The request fields (\\`url\\` to \\`content\\_type\\`) work as in \\`EnqueueRequest\\`. A step without \\`payload\\` or \\`body\\` is sent the run's context as JSON (\\`workflow\\_run\\_id\\`, \\`workflow\\`, \\`step\\`, \\`step\\_id\\`, \\`run\\_attempt\\`, \\`input\\`); every step gets the \\`Workly-Workflow\\`, \\`Workly-Workflow-Run-Id\\`, \\`Workly-Workflow-Step\\`, \\`Workly-Workflow-Step-Id\\` and \\`Workly-Workflow-Run-Attempt\\` headers. The step ID is the same on every delivery of the step, so it can serve as an idempotency key; with the run attempt, it keys work that a retried run should redo.\n\n```go\ntype WorkflowStepTask struct {\n\tAttemptCount int     `json:\"attempt_count\"`\n\tId           string  `json:\"id\"`\n\tLastError    *string `json:\"last_error,omitempty\"`\n\n\t// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tLastOutcome *Outcome `json:\"last_outcome,omitempty\"`\n\tLastStatus  *int     `json:\"last_status,omitempty\"`\n\tQueue       string   `json:\"queue\"`\n\n\t// RunAt When a pending task is next delivered.\n\tRunAt *time.Time `json:\"run_at,omitempty\"`\n\n\t// State A `pending` task with `run_at` in the future is scheduled. A `failed`\n\t// task has exhausted its attempts or got a non-retryable response.\n\tState TaskState `json:\"state\"`\n}\n```\nWorkflowStepTask The step's task, which records its attempts.\n\n","path":"github.com/worklydev/workly/internal/client","name":"client","synopsis":"Package client provides primitives to interact with the openapi HTTP API.","isRedistributable":true}
