// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.

package models

import (
	"github.com/git-bug/git-bug/cache"
	"github.com/git-bug/git-bug/entities/bug"
	"github.com/git-bug/git-bug/entities/common"
	"github.com/git-bug/git-bug/entity/dag"
	"github.com/git-bug/git-bug/repository"
)

// An object that has an author.
type Authored interface {
	IsAuthored()
}

// An entity (identity, bug, ...).
type Entity interface {
	IsEntity()
}

type BugAddCommentAndCloseInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The name of the repository. If not set, the default repository is used.
	RepoRef *string `json:"repoRef,omitempty"`
	// The bug ID's prefix.
	Prefix string `json:"prefix"`
	// The message to be added to the bug.
	Message string `json:"message"`
	// The collection of file's hash required for the first message.
	Files []repository.Hash `json:"files,omitempty"`
}

type BugAddCommentAndClosePayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The affected bug.
	Bug BugWrapper `json:"bug"`
	// The resulting AddComment operation.
	CommentOperation *bug.AddCommentOperation `json:"commentOperation"`
	// The resulting SetStatusOperation.
	StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
}

type BugAddCommentAndReopenInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The name of the repository. If not set, the default repository is used.
	RepoRef *string `json:"repoRef,omitempty"`
	// The bug ID's prefix.
	Prefix string `json:"prefix"`
	// The message to be added to the bug.
	Message string `json:"message"`
	// The collection of file's hash required for the first message.
	Files []repository.Hash `json:"files,omitempty"`
}

type BugAddCommentAndReopenPayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The affected bug.
	Bug BugWrapper `json:"bug"`
	// The resulting AddComment operation.
	CommentOperation *bug.AddCommentOperation `json:"commentOperation"`
	// The resulting SetStatusOperation.
	StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
}

type BugAddCommentInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The name of the repository. If not set, the default repository is used.
	RepoRef *string `json:"repoRef,omitempty"`
	// The bug ID's prefix.
	Prefix string `json:"prefix"`
	// The message to be added to the bug.
	Message string `json:"message"`
	// The collection of file's hash required for the first message.
	Files []repository.Hash `json:"files,omitempty"`
}

type BugAddCommentPayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The affected bug.
	Bug BugWrapper `json:"bug"`
	// The resulting operation.
	Operation *bug.AddCommentOperation `json:"operation"`
}

type BugChangeLabelInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The name of the repository. If not set, the default repository is used.
	RepoRef *string `json:"repoRef,omitempty"`
	// The bug ID's prefix.
	Prefix string `json:"prefix"`
	// The list of label to add.
	Added []string `json:"added,omitempty"`
	// The list of label to remove.
	Removed []string `json:"Removed,omitempty"`
}

type BugChangeLabelPayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The affected bug.
	Bug BugWrapper `json:"bug"`
	// The resulting operation.
	Operation *bug.LabelChangeOperation `json:"operation"`
	// The effect each source label had.
	Results []*bug.LabelChangeResult `json:"results"`
}

type BugCommentConnection struct {
	Edges      []*BugCommentEdge `json:"edges"`
	Nodes      []*bug.Comment    `json:"nodes"`
	PageInfo   *PageInfo         `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

type BugCommentEdge struct {
	Cursor string       `json:"cursor"`
	Node   *bug.Comment `json:"node"`
}

// The connection type for Bug.
type BugConnection struct {
	// A list of edges.
	Edges []*BugEdge   `json:"edges"`
	Nodes []BugWrapper `json:"nodes"`
	// Information to aid in pagination.
	PageInfo *PageInfo `json:"pageInfo"`
	// Identifies the total count of items in the connection.
	TotalCount int `json:"totalCount"`
}

type BugCreateInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The name of the repository. If not set, the default repository is used.
	RepoRef *string `json:"repoRef,omitempty"`
	// The title of the new bug.
	Title string `json:"title"`
	// The first message of the new bug.
	Message string `json:"message"`
	// The collection of file's hash required for the first message.
	Files []repository.Hash `json:"files,omitempty"`
}

type BugCreatePayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The created bug.
	Bug BugWrapper `json:"bug"`
	// The resulting operation.
	Operation *bug.CreateOperation `json:"operation"`
}

// An edge in a connection.
type BugEdge struct {
	// A cursor for use in pagination.
	Cursor string `json:"cursor"`
	// The item at the end of the edge.
	Node BugWrapper `json:"node"`
}

type BugEditCommentInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The name of the repository. If not set, the default repository is used.
	RepoRef *string `json:"repoRef,omitempty"`
	// A prefix of the CombinedId of the comment to be changed.
	TargetPrefix string `json:"targetPrefix"`
	// The new message to be set.
	Message string `json:"message"`
	// The collection of file's hash required for the first message.
	Files []repository.Hash `json:"files,omitempty"`
}

type BugEditCommentPayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The affected bug.
	Bug BugWrapper `json:"bug"`
	// The resulting operation.
	Operation *bug.EditCommentOperation `json:"operation"`
}

type BugEvent struct {
	Type cache.EntityEventType `json:"type"`
	Bug  BugWrapper            `json:"bug"`
}

type BugSetTitleInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The name of the repository. If not set, the default repository is used.
	RepoRef *string `json:"repoRef,omitempty"`
	// The bug ID's prefix.
	Prefix string `json:"prefix"`
	// The new title.
	Title string `json:"title"`
}

type BugSetTitlePayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The affected bug.
	Bug BugWrapper `json:"bug"`
	// The resulting operation
	Operation *bug.SetTitleOperation `json:"operation"`
}

type BugStatusCloseInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The name of the repository. If not set, the default repository is used.
	RepoRef *string `json:"repoRef,omitempty"`
	// The bug ID's prefix.
	Prefix string `json:"prefix"`
}

type BugStatusClosePayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The affected bug.
	Bug BugWrapper `json:"bug"`
	// The resulting operation.
	Operation *bug.SetStatusOperation `json:"operation"`
}

type BugStatusOpenInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The name of the repository. If not set, the default repository is used.
	RepoRef *string `json:"repoRef,omitempty"`
	// The bug ID's prefix.
	Prefix string `json:"prefix"`
}

type BugStatusOpenPayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The affected bug.
	Bug BugWrapper `json:"bug"`
	// The resulting operation.
	Operation *bug.SetStatusOperation `json:"operation"`
}

// The connection type for TimelineItem
type BugTimelineItemConnection struct {
	Edges      []*BugTimelineItemEdge `json:"edges"`
	Nodes      []bug.TimelineItem     `json:"nodes"`
	PageInfo   *PageInfo              `json:"pageInfo"`
	TotalCount int                    `json:"totalCount"`
}

// Represent a TimelineItem
type BugTimelineItemEdge struct {
	Cursor string           `json:"cursor"`
	Node   bug.TimelineItem `json:"node"`
}

type EntityEvent struct {
	Type   cache.EntityEventType `json:"type"`
	Entity Entity                `json:"entity,omitempty"`
}

// The content of a git blob (file).
type GitBlob struct {
	// Path of the file relative to the repository root.
	Path string `json:"path"`
	// Git object hash. Can be used as a stable cache key or to construct a
	//     raw download URL.
	Hash string `json:"hash"`
	// UTF-8 text content of the file. Null when isBinary is true or when
	//     the file is too large to be returned inline (see isTruncated).
	Text *string `json:"text,omitempty"`
	// Size in bytes.
	Size int `json:"size"`
	// True when the file contains null bytes and is treated as binary.
	//     text will be null.
	IsBinary bool `json:"isBinary"`
	// True when the file exceeds the maximum inline size and text has been
	//     omitted. Use the raw download endpoint to retrieve the full content.
	IsTruncated bool `json:"isTruncated"`
}

type GitChangedFileConnection struct {
	Nodes      []*repository.ChangedFile `json:"nodes"`
	PageInfo   *PageInfo                 `json:"pageInfo"`
	TotalCount int                       `json:"totalCount"`
}

// Paginated list of commits.
type GitCommitConnection struct {
	Nodes      []*GitCommitMeta `json:"nodes"`
	PageInfo   *PageInfo        `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

// The last commit that touched each requested entry in a directory.
type GitLastCommit struct {
	// Entry name within the directory.
	Name string `json:"name"`
	// Most recent commit that modified this entry.
	Commit *GitCommitMeta `json:"commit"`
}

// A git branch or tag reference.
type GitRef struct {
	// Full reference name, e.g. refs/heads/main or refs/tags/v1.0.
	Name string `json:"name"`
	// Short name, e.g. main or v1.0.
	ShortName string `json:"shortName"`
	// Whether this reference is a branch or a tag.
	Type GitRefType `json:"type"`
	// Commit hash the reference points to.
	Hash string `json:"hash"`
	// True for the branch HEAD currently points to.
	IsDefault bool `json:"isDefault"`
}

type GitRefConnection struct {
	Nodes      []*GitRef `json:"nodes"`
	PageInfo   *PageInfo `json:"pageInfo"`
	TotalCount int       `json:"totalCount"`
}

type IdentityConnection struct {
	Edges      []*IdentityEdge   `json:"edges"`
	Nodes      []IdentityWrapper `json:"nodes"`
	PageInfo   *PageInfo         `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

type IdentityEdge struct {
	Cursor string          `json:"cursor"`
	Node   IdentityWrapper `json:"node"`
}

type IdentityEvent struct {
	Type     cache.EntityEventType `json:"type"`
	Identity IdentityWrapper       `json:"identity"`
}

type LabelConnection struct {
	Edges      []*LabelEdge   `json:"edges"`
	Nodes      []common.Label `json:"nodes"`
	PageInfo   *PageInfo      `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

type LabelEdge struct {
	Cursor string       `json:"cursor"`
	Node   common.Label `json:"node"`
}

type Mutation struct {
}

// The connection type for an Operation
type OperationConnection struct {
	Edges      []*OperationEdge `json:"edges"`
	Nodes      []dag.Operation  `json:"nodes"`
	PageInfo   *PageInfo        `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

// Represent an Operation
type OperationEdge struct {
	Cursor string        `json:"cursor"`
	Node   dag.Operation `json:"node"`
}

// Information about pagination in a connection.
type PageInfo struct {
	// When paginating forwards, are there more items?
	HasNextPage bool `json:"hasNextPage"`
	// When paginating backwards, are there more items?
	HasPreviousPage bool `json:"hasPreviousPage"`
	// When paginating backwards, the cursor to continue.
	StartCursor string `json:"startCursor"`
	// When paginating forwards, the cursor to continue.
	EndCursor string `json:"endCursor"`
}

type Query struct {
}

type RepositoryConnection struct {
	Edges      []*RepositoryEdge `json:"edges"`
	Nodes      []*Repository     `json:"nodes"`
	PageInfo   *PageInfo         `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

type RepositoryEdge struct {
	Cursor string      `json:"cursor"`
	Node   *Repository `json:"node"`
}

type Subscription struct {
}
