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 pathattempt.go
57 lines (46 loc) · 1.52 KB
/
attempt.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
// This file was auto-generated by Fern from our API Definition.
package api
import (
fmt "fmt"
)
type AttemptListRequest struct {
EventId []*string `json:"-" url:"event_id,omitempty"`
OrderBy *AttemptListRequestOrderBy `json:"-" url:"order_by,omitempty"`
Dir *AttemptListRequestDir `json:"-" url:"dir,omitempty"`
Limit *int `json:"-" url:"limit,omitempty"`
Next *string `json:"-" url:"next,omitempty"`
Prev *string `json:"-" url:"prev,omitempty"`
}
type AttemptListRequestDir string
const (
AttemptListRequestDirAsc AttemptListRequestDir = "asc"
AttemptListRequestDirDesc AttemptListRequestDir = "desc"
)
func NewAttemptListRequestDirFromString(s string) (AttemptListRequestDir, error) {
switch s {
case "asc":
return AttemptListRequestDirAsc, nil
case "desc":
return AttemptListRequestDirDesc, nil
}
var t AttemptListRequestDir
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (a AttemptListRequestDir) Ptr() *AttemptListRequestDir {
return &a
}
type AttemptListRequestOrderBy string
const (
AttemptListRequestOrderByCreatedAt AttemptListRequestOrderBy = "created_at"
)
func NewAttemptListRequestOrderByFromString(s string) (AttemptListRequestOrderBy, error) {
switch s {
case "created_at":
return AttemptListRequestOrderByCreatedAt, nil
}
var t AttemptListRequestOrderBy
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (a AttemptListRequestOrderBy) Ptr() *AttemptListRequestOrderBy {
return &a
}