This repository has been archived by the owner on Feb 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbookmark.go
114 lines (96 loc) · 3.61 KB
/
bookmark.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// This file was auto-generated by Fern from our API Definition.
package api
import (
fmt "fmt"
core "github.com/hookdeck/hookdeck-go-sdk/core"
time "time"
)
type BookmarkCreateRequest struct {
// ID of the event data to bookmark
EventDataId string `json:"event_data_id" url:"-"`
// ID of the associated connection
WebhookId string `json:"webhook_id" url:"-"`
// Descriptive name of the bookmark
Label string `json:"label" url:"-"`
// A unique, human-friendly name for the bookmark
Name *core.Optional[string] `json:"name,omitempty" url:"-"`
}
type BookmarkListRequest struct {
Id []*string `json:"-" url:"id,omitempty"`
Name []*string `json:"-" url:"name,omitempty"`
WebhookId []*string `json:"-" url:"webhook_id,omitempty"`
EventDataId []*string `json:"-" url:"event_data_id,omitempty"`
Label []*string `json:"-" url:"label,omitempty"`
LastUsedAt *time.Time `json:"-" url:"last_used_at,omitempty"`
OrderBy *BookmarkListRequestOrderBy `json:"-" url:"order_by,omitempty"`
Dir *BookmarkListRequestDir `json:"-" url:"dir,omitempty"`
Limit *int `json:"-" url:"limit,omitempty"`
Next *string `json:"-" url:"next,omitempty"`
Prev *string `json:"-" url:"prev,omitempty"`
}
type BookmarkTriggerRequest struct {
// Bookmark target
Target *core.Optional[BookmarkTriggerRequestTarget] `json:"target,omitempty" url:"-"`
}
type BookmarkListRequestDir string
const (
BookmarkListRequestDirAsc BookmarkListRequestDir = "asc"
BookmarkListRequestDirDesc BookmarkListRequestDir = "desc"
)
func NewBookmarkListRequestDirFromString(s string) (BookmarkListRequestDir, error) {
switch s {
case "asc":
return BookmarkListRequestDirAsc, nil
case "desc":
return BookmarkListRequestDirDesc, nil
}
var t BookmarkListRequestDir
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (b BookmarkListRequestDir) Ptr() *BookmarkListRequestDir {
return &b
}
type BookmarkListRequestOrderBy string
const (
BookmarkListRequestOrderByCreatedAt BookmarkListRequestOrderBy = "created_at"
)
func NewBookmarkListRequestOrderByFromString(s string) (BookmarkListRequestOrderBy, error) {
switch s {
case "created_at":
return BookmarkListRequestOrderByCreatedAt, nil
}
var t BookmarkListRequestOrderBy
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (b BookmarkListRequestOrderBy) Ptr() *BookmarkListRequestOrderBy {
return &b
}
// Bookmark target
type BookmarkTriggerRequestTarget string
const (
BookmarkTriggerRequestTargetHttp BookmarkTriggerRequestTarget = "http"
BookmarkTriggerRequestTargetCli BookmarkTriggerRequestTarget = "cli"
)
func NewBookmarkTriggerRequestTargetFromString(s string) (BookmarkTriggerRequestTarget, error) {
switch s {
case "http":
return BookmarkTriggerRequestTargetHttp, nil
case "cli":
return BookmarkTriggerRequestTargetCli, nil
}
var t BookmarkTriggerRequestTarget
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (b BookmarkTriggerRequestTarget) Ptr() *BookmarkTriggerRequestTarget {
return &b
}
type BookmarkUpdateRequest struct {
// ID of the event data to bookmark
EventDataId *core.Optional[string] `json:"event_data_id,omitempty" url:"-"`
// ID of the associated connection
WebhookId *core.Optional[string] `json:"webhook_id,omitempty" url:"-"`
// Descriptive name of the bookmark
Label *core.Optional[string] `json:"label,omitempty" url:"-"`
// A unique, human-friendly name for the bookmark
Name *core.Optional[string] `json:"name,omitempty" url:"-"`
}