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

package tangled

// schema: sh.tangled.ci.cancelPipeline

import (
	"context"

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

const (
	CiCancelPipelineNSID = "sh.tangled.ci.cancelPipeline"
)

// CiCancelPipeline_Input is the input argument to a sh.tangled.ci.cancelPipeline call.
type CiCancelPipeline_Input struct {
	// pipeline: pipeline TID
	Pipeline string `json:"pipeline" cborgen:"pipeline"`
	// repo: git repository DID
	Repo string `json:"repo" cborgen:"repo"`
	// workflows: Workflow names to filter. When not provided, entire pipeline will be canceled.
	Workflows []string `json:"workflows,omitempty" cborgen:"workflows,omitempty"`
}

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

	return nil
}
