-
Notifications
You must be signed in to change notification settings - Fork 2
/
event.go
84 lines (73 loc) · 2.64 KB
/
event.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// This file was auto-generated by Fern from our API Definition.
package api
import (
fmt "fmt"
time "time"
)
type EventListRequest struct {
Id []*string `json:"-"`
Status *EventStatus `json:"-"`
WebhookId []*string `json:"-"`
DestinationId []*string `json:"-"`
SourceId []*string `json:"-"`
Attempts *int `json:"-"`
ResponseStatus *int `json:"-"`
SuccessfulAt *time.Time `json:"-"`
CreatedAt *time.Time `json:"-"`
ErrorCode *AttemptErrorCodes `json:"-"`
CliId *string `json:"-"`
LastAttemptAt *time.Time `json:"-"`
SearchTerm *string `json:"-"`
Headers *string `json:"-"`
Body *string `json:"-"`
ParsedQuery *string `json:"-"`
Path *string `json:"-"`
CliUserId []*string `json:"-"`
IssueId []*string `json:"-"`
EventDataId []*string `json:"-"`
BulkRetryId []*string `json:"-"`
Include *string `json:"-"`
OrderBy *EventListRequestOrderBy `json:"-"`
Dir *EventListRequestDir `json:"-"`
Limit *int `json:"-"`
Next *string `json:"-"`
Prev *string `json:"-"`
}
// Sort direction
type EventListRequestDir string
const (
EventListRequestDirAsc EventListRequestDir = "asc"
EventListRequestDirDesc EventListRequestDir = "desc"
)
func NewEventListRequestDirFromString(s string) (EventListRequestDir, error) {
switch s {
case "asc":
return EventListRequestDirAsc, nil
case "desc":
return EventListRequestDirDesc, nil
}
var t EventListRequestDir
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (e EventListRequestDir) Ptr() *EventListRequestDir {
return &e
}
// Sort key
type EventListRequestOrderBy string
const (
EventListRequestOrderByLastAttemptAt EventListRequestOrderBy = "last_attempt_at"
EventListRequestOrderByCreatedAt EventListRequestOrderBy = "created_at"
)
func NewEventListRequestOrderByFromString(s string) (EventListRequestOrderBy, error) {
switch s {
case "last_attempt_at":
return EventListRequestOrderByLastAttemptAt, nil
case "created_at":
return EventListRequestOrderByCreatedAt, nil
}
var t EventListRequestOrderBy
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (e EventListRequestOrderBy) Ptr() *EventListRequestOrderBy {
return &e
}