1// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
2
3package models
4
5import (
6 "bytes"
7 "fmt"
8 "io"
9 "strconv"
10
11 "github.com/git-bug/git-bug/entities/board"
12 "github.com/git-bug/git-bug/entities/bug"
13 "github.com/git-bug/git-bug/entities/common"
14 "github.com/git-bug/git-bug/entity/dag"
15 "github.com/git-bug/git-bug/repository"
16)
17
18// An object that has an author.
19type Authored interface {
20 IsAuthored()
21}
22
23type BoardColumnConnection struct {
24 Edges []*BoardColumnEdge `json:"edges"`
25 Nodes []*board.Column `json:"nodes"`
26 PageInfo *PageInfo `json:"pageInfo"`
27 TotalCount int `json:"totalCount"`
28}
29
30type BoardColumnEdge struct {
31 Cursor string `json:"cursor"`
32 Node *board.Column `json:"node"`
33}
34
35// The connection type for Board.
36type BoardConnection struct {
37 // A list of edges.
38 Edges []*BoardEdge `json:"edges"`
39 Nodes []BoardWrapper `json:"nodes"`
40 // Information to aid in pagination.
41 PageInfo *PageInfo `json:"pageInfo"`
42 // Identifies the total count of items in the connection.
43 TotalCount int `json:"totalCount"`
44}
45
46// An edge in a connection.
47type BoardEdge struct {
48 // A cursor for use in pagination.
49 Cursor string `json:"cursor"`
50 // The item at the end of the edge.
51 Node BoardWrapper `json:"node"`
52}
53
54type BoardItemConnection struct {
55 Edges []*BoardItemEdge `json:"edges"`
56 Nodes []board.Item `json:"nodes"`
57 PageInfo *PageInfo `json:"pageInfo"`
58 TotalCount int `json:"totalCount"`
59}
60
61type BoardItemEdge struct {
62 Cursor string `json:"cursor"`
63 Node board.Item `json:"node"`
64}
65
66type BugAddCommentAndCloseInput struct {
67 // A unique identifier for the client performing the mutation.
68 ClientMutationID *string `json:"clientMutationId,omitempty"`
69 // The name of the repository. If not set, the default repository is used.
70 RepoRef *string `json:"repoRef,omitempty"`
71 // The bug ID's prefix.
72 Prefix string `json:"prefix"`
73 // The message to be added to the bug.
74 Message string `json:"message"`
75 // The collection of file's hash required for the first message.
76 Files []repository.Hash `json:"files,omitempty"`
77}
78
79type BugAddCommentAndClosePayload struct {
80 // A unique identifier for the client performing the mutation.
81 ClientMutationID *string `json:"clientMutationId,omitempty"`
82 // The affected bug.
83 Bug BugWrapper `json:"bug"`
84 // The resulting AddComment operation.
85 CommentOperation *bug.AddCommentOperation `json:"commentOperation"`
86 // The resulting SetStatusOperation.
87 StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
88}
89
90type BugAddCommentAndReopenInput struct {
91 // A unique identifier for the client performing the mutation.
92 ClientMutationID *string `json:"clientMutationId,omitempty"`
93 // The name of the repository. If not set, the default repository is used.
94 RepoRef *string `json:"repoRef,omitempty"`
95 // The bug ID's prefix.
96 Prefix string `json:"prefix"`
97 // The message to be added to the bug.
98 Message string `json:"message"`
99 // The collection of file's hash required for the first message.
100 Files []repository.Hash `json:"files,omitempty"`
101}
102
103type BugAddCommentAndReopenPayload struct {
104 // A unique identifier for the client performing the mutation.
105 ClientMutationID *string `json:"clientMutationId,omitempty"`
106 // The affected bug.
107 Bug BugWrapper `json:"bug"`
108 // The resulting AddComment operation.
109 CommentOperation *bug.AddCommentOperation `json:"commentOperation"`
110 // The resulting SetStatusOperation.
111 StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
112}
113
114type BugAddCommentInput struct {
115 // A unique identifier for the client performing the mutation.
116 ClientMutationID *string `json:"clientMutationId,omitempty"`
117 // The name of the repository. If not set, the default repository is used.
118 RepoRef *string `json:"repoRef,omitempty"`
119 // The bug ID's prefix.
120 Prefix string `json:"prefix"`
121 // The message to be added to the bug.
122 Message string `json:"message"`
123 // The collection of file's hash required for the first message.
124 Files []repository.Hash `json:"files,omitempty"`
125}
126
127type BugAddCommentPayload struct {
128 // A unique identifier for the client performing the mutation.
129 ClientMutationID *string `json:"clientMutationId,omitempty"`
130 // The affected bug.
131 Bug BugWrapper `json:"bug"`
132 // The resulting operation.
133 Operation *bug.AddCommentOperation `json:"operation"`
134}
135
136type BugChangeLabelInput struct {
137 // A unique identifier for the client performing the mutation.
138 ClientMutationID *string `json:"clientMutationId,omitempty"`
139 // The name of the repository. If not set, the default repository is used.
140 RepoRef *string `json:"repoRef,omitempty"`
141 // The bug ID's prefix.
142 Prefix string `json:"prefix"`
143 // The list of label to add.
144 Added []string `json:"added,omitempty"`
145 // The list of label to remove.
146 Removed []string `json:"Removed,omitempty"`
147}
148
149type BugChangeLabelPayload struct {
150 // A unique identifier for the client performing the mutation.
151 ClientMutationID *string `json:"clientMutationId,omitempty"`
152 // The affected bug.
153 Bug BugWrapper `json:"bug"`
154 // The resulting operation.
155 Operation *bug.LabelChangeOperation `json:"operation"`
156 // The effect each source label had.
157 Results []*bug.LabelChangeResult `json:"results"`
158}
159
160type BugCommentConnection struct {
161 Edges []*BugCommentEdge `json:"edges"`
162 Nodes []*bug.Comment `json:"nodes"`
163 PageInfo *PageInfo `json:"pageInfo"`
164 TotalCount int `json:"totalCount"`
165}
166
167type BugCommentEdge struct {
168 Cursor string `json:"cursor"`
169 Node *bug.Comment `json:"node"`
170}
171
172// The connection type for Bug.
173type BugConnection struct {
174 // A list of edges.
175 Edges []*BugEdge `json:"edges"`
176 Nodes []BugWrapper `json:"nodes"`
177 // Information to aid in pagination.
178 PageInfo *PageInfo `json:"pageInfo"`
179 // Identifies the total count of items in the connection.
180 TotalCount int `json:"totalCount"`
181}
182
183type BugCreateInput struct {
184 // A unique identifier for the client performing the mutation.
185 ClientMutationID *string `json:"clientMutationId,omitempty"`
186 // The name of the repository. If not set, the default repository is used.
187 RepoRef *string `json:"repoRef,omitempty"`
188 // The title of the new bug.
189 Title string `json:"title"`
190 // The first message of the new bug.
191 Message string `json:"message"`
192 // The collection of file's hash required for the first message.
193 Files []repository.Hash `json:"files,omitempty"`
194}
195
196type BugCreatePayload struct {
197 // A unique identifier for the client performing the mutation.
198 ClientMutationID *string `json:"clientMutationId,omitempty"`
199 // The created bug.
200 Bug BugWrapper `json:"bug"`
201 // The resulting operation.
202 Operation *bug.CreateOperation `json:"operation"`
203}
204
205// An edge in a connection.
206type BugEdge struct {
207 // A cursor for use in pagination.
208 Cursor string `json:"cursor"`
209 // The item at the end of the edge.
210 Node BugWrapper `json:"node"`
211}
212
213type BugEditCommentInput struct {
214 // A unique identifier for the client performing the mutation.
215 ClientMutationID *string `json:"clientMutationId,omitempty"`
216 // The name of the repository. If not set, the default repository is used.
217 RepoRef *string `json:"repoRef,omitempty"`
218 // A prefix of the CombinedId of the comment to be changed.
219 TargetPrefix string `json:"targetPrefix"`
220 // The new message to be set.
221 Message string `json:"message"`
222 // The collection of file's hash required for the first message.
223 Files []repository.Hash `json:"files,omitempty"`
224}
225
226type BugEditCommentPayload struct {
227 // A unique identifier for the client performing the mutation.
228 ClientMutationID *string `json:"clientMutationId,omitempty"`
229 // The affected bug.
230 Bug BugWrapper `json:"bug"`
231 // The resulting operation.
232 Operation *bug.EditCommentOperation `json:"operation"`
233}
234
235type BugSetTitleInput struct {
236 // A unique identifier for the client performing the mutation.
237 ClientMutationID *string `json:"clientMutationId,omitempty"`
238 // The name of the repository. If not set, the default repository is used.
239 RepoRef *string `json:"repoRef,omitempty"`
240 // The bug ID's prefix.
241 Prefix string `json:"prefix"`
242 // The new title.
243 Title string `json:"title"`
244}
245
246type BugSetTitlePayload struct {
247 // A unique identifier for the client performing the mutation.
248 ClientMutationID *string `json:"clientMutationId,omitempty"`
249 // The affected bug.
250 Bug BugWrapper `json:"bug"`
251 // The resulting operation
252 Operation *bug.SetTitleOperation `json:"operation"`
253}
254
255type BugStatusCloseInput struct {
256 // A unique identifier for the client performing the mutation.
257 ClientMutationID *string `json:"clientMutationId,omitempty"`
258 // The name of the repository. If not set, the default repository is used.
259 RepoRef *string `json:"repoRef,omitempty"`
260 // The bug ID's prefix.
261 Prefix string `json:"prefix"`
262}
263
264type BugStatusClosePayload struct {
265 // A unique identifier for the client performing the mutation.
266 ClientMutationID *string `json:"clientMutationId,omitempty"`
267 // The affected bug.
268 Bug BugWrapper `json:"bug"`
269 // The resulting operation.
270 Operation *bug.SetStatusOperation `json:"operation"`
271}
272
273type BugStatusOpenInput struct {
274 // A unique identifier for the client performing the mutation.
275 ClientMutationID *string `json:"clientMutationId,omitempty"`
276 // The name of the repository. If not set, the default repository is used.
277 RepoRef *string `json:"repoRef,omitempty"`
278 // The bug ID's prefix.
279 Prefix string `json:"prefix"`
280}
281
282type BugStatusOpenPayload struct {
283 // A unique identifier for the client performing the mutation.
284 ClientMutationID *string `json:"clientMutationId,omitempty"`
285 // The affected bug.
286 Bug BugWrapper `json:"bug"`
287 // The resulting operation.
288 Operation *bug.SetStatusOperation `json:"operation"`
289}
290
291// The connection type for TimelineItem
292type BugTimelineItemConnection struct {
293 Edges []*BugTimelineItemEdge `json:"edges"`
294 Nodes []bug.TimelineItem `json:"nodes"`
295 PageInfo *PageInfo `json:"pageInfo"`
296 TotalCount int `json:"totalCount"`
297}
298
299// Represent a TimelineItem
300type BugTimelineItemEdge struct {
301 Cursor string `json:"cursor"`
302 Node bug.TimelineItem `json:"node"`
303}
304
305type IdentityConnection struct {
306 Edges []*IdentityEdge `json:"edges"`
307 Nodes []IdentityWrapper `json:"nodes"`
308 PageInfo *PageInfo `json:"pageInfo"`
309 TotalCount int `json:"totalCount"`
310}
311
312type IdentityEdge struct {
313 Cursor string `json:"cursor"`
314 Node IdentityWrapper `json:"node"`
315}
316
317type LabelConnection struct {
318 Edges []*LabelEdge `json:"edges"`
319 Nodes []common.Label `json:"nodes"`
320 PageInfo *PageInfo `json:"pageInfo"`
321 TotalCount int `json:"totalCount"`
322}
323
324type LabelEdge struct {
325 Cursor string `json:"cursor"`
326 Node common.Label `json:"node"`
327}
328
329type Mutation struct {
330}
331
332// The connection type for an Operation
333type OperationConnection struct {
334 Edges []*OperationEdge `json:"edges"`
335 Nodes []dag.Operation `json:"nodes"`
336 PageInfo *PageInfo `json:"pageInfo"`
337 TotalCount int `json:"totalCount"`
338}
339
340// Represent an Operation
341type OperationEdge struct {
342 Cursor string `json:"cursor"`
343 Node dag.Operation `json:"node"`
344}
345
346// Information about pagination in a connection.
347type PageInfo struct {
348 // When paginating forwards, are there more items?
349 HasNextPage bool `json:"hasNextPage"`
350 // When paginating backwards, are there more items?
351 HasPreviousPage bool `json:"hasPreviousPage"`
352 // When paginating backwards, the cursor to continue.
353 StartCursor string `json:"startCursor"`
354 // When paginating forwards, the cursor to continue.
355 EndCursor string `json:"endCursor"`
356}
357
358type Query struct {
359}
360
361type BoardItemEntityType string
362
363const (
364 BoardItemEntityTypeBug BoardItemEntityType = "BUG"
365)
366
367var AllBoardItemEntityType = []BoardItemEntityType{
368 BoardItemEntityTypeBug,
369}
370
371func (e BoardItemEntityType) IsValid() bool {
372 switch e {
373 case BoardItemEntityTypeBug:
374 return true
375 }
376 return false
377}
378
379func (e BoardItemEntityType) String() string {
380 return string(e)
381}
382
383func (e *BoardItemEntityType) UnmarshalGQL(v any) error {
384 str, ok := v.(string)
385 if !ok {
386 return fmt.Errorf("enums must be strings")
387 }
388
389 *e = BoardItemEntityType(str)
390 if !e.IsValid() {
391 return fmt.Errorf("%s is not a valid BoardItemEntityType", str)
392 }
393 return nil
394}
395
396func (e BoardItemEntityType) MarshalGQL(w io.Writer) {
397 fmt.Fprint(w, strconv.Quote(e.String()))
398}
399
400func (e *BoardItemEntityType) UnmarshalJSON(b []byte) error {
401 s, err := strconv.Unquote(string(b))
402 if err != nil {
403 return err
404 }
405 return e.UnmarshalGQL(s)
406}
407
408func (e BoardItemEntityType) MarshalJSON() ([]byte, error) {
409 var buf bytes.Buffer
410 e.MarshalGQL(&buf)
411 return buf.Bytes(), nil
412}