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 pathignored_event_bulk_retry.go
163 lines (137 loc) · 5.6 KB
/
ignored_event_bulk_retry.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// This file was auto-generated by Fern from our API Definition.
package api
import (
json "encoding/json"
fmt "fmt"
core "github.com/hookdeck/hookdeck-go-sdk/core"
time "time"
)
type IgnoredEventBulkRetryCreateRequest struct {
// Filter by the bulk retry ignored event query object
Query *core.Optional[IgnoredEventBulkRetryCreateRequestQuery] `json:"query,omitempty" url:"-"`
}
type IgnoredEventBulkRetryListRequest struct {
CancelledAt *time.Time `json:"-" url:"cancelled_at,omitempty"`
CompletedAt *time.Time `json:"-" url:"completed_at,omitempty"`
CreatedAt *time.Time `json:"-" url:"created_at,omitempty"`
Id []*string `json:"-" url:"id,omitempty"`
QueryPartialMatch *bool `json:"-" url:"query_partial_match,omitempty"`
InProgress *bool `json:"-" url:"in_progress,omitempty"`
OrderBy *IgnoredEventBulkRetryListRequestOrderBy `json:"-" url:"order_by,omitempty"`
Dir *IgnoredEventBulkRetryListRequestDir `json:"-" url:"dir,omitempty"`
Limit *int `json:"-" url:"limit,omitempty"`
Next *string `json:"-" url:"next,omitempty"`
Prev *string `json:"-" url:"prev,omitempty"`
}
// Filter by the bulk retry ignored event query object
type IgnoredEventBulkRetryCreateRequestQuery struct {
// The cause of the ignored event
Cause *IgnoredEventBulkRetryCreateRequestQueryCause `json:"cause,omitempty" url:"cause,omitempty"`
// Connection ID of the ignored event
WebhookId *IgnoredEventBulkRetryCreateRequestQueryWebhookId `json:"webhook_id,omitempty" url:"webhook_id,omitempty"`
// The associated transformation ID (only applicable to the cause `TRANSFORMATION_FAILED`)
TransformationId *string `json:"transformation_id,omitempty" url:"transformation_id,omitempty"`
extraProperties map[string]interface{}
_rawJSON json.RawMessage
}
func (i *IgnoredEventBulkRetryCreateRequestQuery) GetExtraProperties() map[string]interface{} {
return i.extraProperties
}
func (i *IgnoredEventBulkRetryCreateRequestQuery) UnmarshalJSON(data []byte) error {
type unmarshaler IgnoredEventBulkRetryCreateRequestQuery
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*i = IgnoredEventBulkRetryCreateRequestQuery(value)
extraProperties, err := core.ExtractExtraProperties(data, *i)
if err != nil {
return err
}
i.extraProperties = extraProperties
i._rawJSON = json.RawMessage(data)
return nil
}
func (i *IgnoredEventBulkRetryCreateRequestQuery) String() string {
if len(i._rawJSON) > 0 {
if value, err := core.StringifyJSON(i._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(i); err == nil {
return value
}
return fmt.Sprintf("%#v", i)
}
type IgnoredEventBulkRetryListRequestDir string
const (
IgnoredEventBulkRetryListRequestDirAsc IgnoredEventBulkRetryListRequestDir = "asc"
IgnoredEventBulkRetryListRequestDirDesc IgnoredEventBulkRetryListRequestDir = "desc"
)
func NewIgnoredEventBulkRetryListRequestDirFromString(s string) (IgnoredEventBulkRetryListRequestDir, error) {
switch s {
case "asc":
return IgnoredEventBulkRetryListRequestDirAsc, nil
case "desc":
return IgnoredEventBulkRetryListRequestDirDesc, nil
}
var t IgnoredEventBulkRetryListRequestDir
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (i IgnoredEventBulkRetryListRequestDir) Ptr() *IgnoredEventBulkRetryListRequestDir {
return &i
}
type IgnoredEventBulkRetryListRequestOrderBy string
const (
IgnoredEventBulkRetryListRequestOrderByCreatedAt IgnoredEventBulkRetryListRequestOrderBy = "created_at"
)
func NewIgnoredEventBulkRetryListRequestOrderByFromString(s string) (IgnoredEventBulkRetryListRequestOrderBy, error) {
switch s {
case "created_at":
return IgnoredEventBulkRetryListRequestOrderByCreatedAt, nil
}
var t IgnoredEventBulkRetryListRequestOrderBy
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (i IgnoredEventBulkRetryListRequestOrderBy) Ptr() *IgnoredEventBulkRetryListRequestOrderBy {
return &i
}
type IgnoredEventBulkRetryPlanResponse struct {
// Number of batches required to complete the bulk retry
EstimatedBatch *int `json:"estimated_batch,omitempty" url:"estimated_batch,omitempty"`
// Number of estimated events to be retried
EstimatedCount *int `json:"estimated_count,omitempty" url:"estimated_count,omitempty"`
// Progression of the batch operations, values 0 - 1
Progress *float64 `json:"progress,omitempty" url:"progress,omitempty"`
extraProperties map[string]interface{}
_rawJSON json.RawMessage
}
func (i *IgnoredEventBulkRetryPlanResponse) GetExtraProperties() map[string]interface{} {
return i.extraProperties
}
func (i *IgnoredEventBulkRetryPlanResponse) UnmarshalJSON(data []byte) error {
type unmarshaler IgnoredEventBulkRetryPlanResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*i = IgnoredEventBulkRetryPlanResponse(value)
extraProperties, err := core.ExtractExtraProperties(data, *i)
if err != nil {
return err
}
i.extraProperties = extraProperties
i._rawJSON = json.RawMessage(data)
return nil
}
func (i *IgnoredEventBulkRetryPlanResponse) String() string {
if len(i._rawJSON) > 0 {
if value, err := core.StringifyJSON(i._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(i); err == nil {
return value
}
return fmt.Sprintf("%#v", i)
}