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

package tangled

// schema: sh.tangled.git.refUpdate

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

const (
	GitRefUpdateNSID = "sh.tangled.git.refUpdate"
)

func init() {
	util.RegisterType("sh.tangled.git.refUpdate", &GitRefUpdate{})
} //
// RECORDTYPE: GitRefUpdate
type GitRefUpdate struct {
	LexiconTypeID string `json:"$type,const=sh.tangled.git.refUpdate" cborgen:"$type,const=sh.tangled.git.refUpdate"`
	// changedFiles: files changed between commits
	ChangedFiles []string `json:"changedFiles,omitempty" cborgen:"changedFiles,omitempty"`
	// committerDid: did of the user that pushed this ref
	CommitterDid string             `json:"committerDid" cborgen:"committerDid"`
	Meta         *GitRefUpdate_Meta `json:"meta" cborgen:"meta"`
	// newSha: new SHA of this ref
	NewSha string `json:"newSha" cborgen:"newSha"`
	// oldSha: old SHA of this ref
	OldSha string `json:"oldSha" cborgen:"oldSha"`
	// ownerDid: did of the owner of the repo
	OwnerDid *string `json:"ownerDid,omitempty" cborgen:"ownerDid,omitempty"`
	// pushOptions: push options passed on git-push
	PushOptions []string `json:"pushOptions,omitempty" cborgen:"pushOptions,omitempty"`
	// ref: Ref being updated
	Ref string `json:"ref" cborgen:"ref"`
	// repo: DID of the repo itself
	Repo string `json:"repo" cborgen:"repo"`
}

// GitRefUpdate_CommitCountBreakdown is a "commitCountBreakdown" in the sh.tangled.git.refUpdate schema.
type GitRefUpdate_CommitCountBreakdown struct {
	ByEmail []*GitRefUpdate_IndividualEmailCommitCount `json:"byEmail,omitempty" cborgen:"byEmail,omitempty"`
}

// GitRefUpdate_IndividualEmailCommitCount is a "individualEmailCommitCount" in the sh.tangled.git.refUpdate schema.
type GitRefUpdate_IndividualEmailCommitCount struct {
	Count int64  `json:"count" cborgen:"count"`
	Email string `json:"email" cborgen:"email"`
}

// GitRefUpdate_IndividualLanguageSize is a "individualLanguageSize" in the sh.tangled.git.refUpdate schema.
type GitRefUpdate_IndividualLanguageSize struct {
	Lang string `json:"lang" cborgen:"lang"`
	Size int64  `json:"size" cborgen:"size"`
}

// GitRefUpdate_LangBreakdown is a "langBreakdown" in the sh.tangled.git.refUpdate schema.
type GitRefUpdate_LangBreakdown struct {
	Inputs []*GitRefUpdate_IndividualLanguageSize `json:"inputs,omitempty" cborgen:"inputs,omitempty"`
}

// GitRefUpdate_Meta is a "meta" in the sh.tangled.git.refUpdate schema.
type GitRefUpdate_Meta struct {
	CommitCount   *GitRefUpdate_CommitCountBreakdown `json:"commitCount" cborgen:"commitCount"`
	IsDefaultRef  bool                               `json:"isDefaultRef" cborgen:"isDefaultRef"`
	LangBreakdown *GitRefUpdate_LangBreakdown        `json:"langBreakdown,omitempty" cborgen:"langBreakdown,omitempty"`
}
