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

package tangled

// schema: sh.tangled.pipeline

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

const (
	PipelineNSID = "sh.tangled.pipeline"
)

func init() {
	util.RegisterType("sh.tangled.pipeline", &Pipeline{})
} //
// RECORDTYPE: Pipeline
type Pipeline struct {
	LexiconTypeID   string                    `json:"$type,const=sh.tangled.pipeline" cborgen:"$type,const=sh.tangled.pipeline"`
	TriggerMetadata *Pipeline_TriggerMetadata `json:"triggerMetadata" cborgen:"triggerMetadata"`
	Workflows       []*Pipeline_Workflow      `json:"workflows" cborgen:"workflows"`
}

// Pipeline_CloneOpts is a "cloneOpts" in the sh.tangled.pipeline schema.
type Pipeline_CloneOpts struct {
	Depth      int64 `json:"depth" cborgen:"depth"`
	Skip       bool  `json:"skip" cborgen:"skip"`
	Submodules bool  `json:"submodules" cborgen:"submodules"`
	Tags       bool  `json:"tags" cborgen:"tags"`
}

// Pipeline_ManualTriggerData is a "manualTriggerData" in the sh.tangled.pipeline schema.
type Pipeline_ManualTriggerData struct {
	Inputs []*Pipeline_Pair `json:"inputs,omitempty" cborgen:"inputs,omitempty"`
}

// Pipeline_Pair is a "pair" in the sh.tangled.pipeline schema.
type Pipeline_Pair struct {
	Key   string `json:"key" cborgen:"key"`
	Value string `json:"value" cborgen:"value"`
}

// Pipeline_PullRequestTriggerData is a "pullRequestTriggerData" in the sh.tangled.pipeline schema.
type Pipeline_PullRequestTriggerData struct {
	Action       string `json:"action" cborgen:"action"`
	SourceBranch string `json:"sourceBranch" cborgen:"sourceBranch"`
	SourceSha    string `json:"sourceSha" cborgen:"sourceSha"`
	TargetBranch string `json:"targetBranch" cborgen:"targetBranch"`
}

// Pipeline_PushTriggerData is a "pushTriggerData" in the sh.tangled.pipeline schema.
type Pipeline_PushTriggerData struct {
	NewSha string `json:"newSha" cborgen:"newSha"`
	OldSha string `json:"oldSha" cborgen:"oldSha"`
	Ref    string `json:"ref" cborgen:"ref"`
}

// Pipeline_TriggerMetadata is a "triggerMetadata" in the sh.tangled.pipeline schema.
type Pipeline_TriggerMetadata struct {
	Kind        string                           `json:"kind" cborgen:"kind"`
	Manual      *Pipeline_ManualTriggerData      `json:"manual,omitempty" cborgen:"manual,omitempty"`
	PullRequest *Pipeline_PullRequestTriggerData `json:"pullRequest,omitempty" cborgen:"pullRequest,omitempty"`
	Push        *Pipeline_PushTriggerData        `json:"push,omitempty" cborgen:"push,omitempty"`
	Repo        *Pipeline_TriggerRepo            `json:"repo" cborgen:"repo"`
}

// Pipeline_TriggerRepo is a "triggerRepo" in the sh.tangled.pipeline schema.
type Pipeline_TriggerRepo struct {
	DefaultBranch string  `json:"defaultBranch" cborgen:"defaultBranch"`
	Did           string  `json:"did" cborgen:"did"`
	Knot          string  `json:"knot" cborgen:"knot"`
	Repo          *string `json:"repo,omitempty" cborgen:"repo,omitempty"`
	// repoDid: DID of the repo itself
	RepoDid *string `json:"repoDid,omitempty" cborgen:"repoDid,omitempty"`
}

// Pipeline_Workflow is a "workflow" in the sh.tangled.pipeline schema.
type Pipeline_Workflow struct {
	Clone  *Pipeline_CloneOpts `json:"clone" cborgen:"clone"`
	Engine string              `json:"engine" cborgen:"engine"`
	Name   string              `json:"name" cborgen:"name"`
	Raw    string              `json:"raw" cborgen:"raw"`
}
