// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package tangled

// schema: sh.tangled.pipeline.cancelPipeline

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

const (
	PipelineCancelPipelineNSID = "sh.tangled.pipeline.cancelPipeline"
)

// PipelineCancelPipeline_Input is the input argument to a sh.tangled.pipeline.cancelPipeline call.
type PipelineCancelPipeline_Input struct {
	// pipeline: pipeline at-uri
	Pipeline string `json:"pipeline" cborgen:"pipeline"`
	// repo: repo at-uri, spindle can't resolve repo from pipeline at-uri yet
	Repo string `json:"repo" cborgen:"repo"`
	// workflow: workflow name
	Workflow string `json:"workflow" cborgen:"workflow"`
}

// PipelineCancelPipeline calls the XRPC method "sh.tangled.pipeline.cancelPipeline".
func PipelineCancelPipeline(ctx context.Context, c util.LexClient, input *PipelineCancelPipeline_Input) error {
	if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.pipeline.cancelPipeline", nil, input, nil); err != nil {
		return err
	}

	return nil
}
