-
Notifications
You must be signed in to change notification settings - Fork 4
/
request_bulk_retry.go
184 lines (158 loc) · 7.03 KB
/
request_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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
// 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 RequestBulkRetryCreateRequest struct {
// Filter properties for the events to be included in the bulk retry, use query parameters of [Requests](#requests)
Query *core.Optional[RequestBulkRetryCreateRequestQuery] `json:"query,omitempty" url:"-"`
}
type RequestBulkRetryListRequest 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"`
InProgress *bool `json:"-" url:"in_progress,omitempty"`
QueryPartialMatch *bool `json:"-" url:"query_partial_match,omitempty"`
OrderBy *RequestBulkRetryListRequestOrderBy `json:"-" url:"order_by,omitempty"`
Dir *RequestBulkRetryListRequestDir `json:"-" url:"dir,omitempty"`
Limit *int `json:"-" url:"limit,omitempty"`
Next *string `json:"-" url:"next,omitempty"`
Prev *string `json:"-" url:"prev,omitempty"`
}
// Filter properties for the events to be included in the bulk retry, use query parameters of [Requests](#requests)
type RequestBulkRetryCreateRequestQuery struct {
// Filter by requests IDs
Id *RequestBulkRetryCreateRequestQueryId `json:"id,omitempty" url:"id,omitempty"`
// Filter by status
Status *RequestBulkRetryCreateRequestQueryStatus `json:"status,omitempty" url:"status,omitempty"`
// Filter by rejection cause
RejectionCause *RequestBulkRetryCreateRequestQueryRejectionCause `json:"rejection_cause,omitempty" url:"rejection_cause,omitempty"`
// Filter by source IDs
SourceId *RequestBulkRetryCreateRequestQuerySourceId `json:"source_id,omitempty" url:"source_id,omitempty"`
// Filter by verification status
Verified *bool `json:"verified,omitempty" url:"verified,omitempty"`
// URL Encoded string of the value to match partially to the body, headers, parsed_query or path
SearchTerm *string `json:"search_term,omitempty" url:"search_term,omitempty"`
// URL Encoded string of the JSON to match to the data headers
Headers *RequestBulkRetryCreateRequestQueryHeaders `json:"headers,omitempty" url:"headers,omitempty"`
// URL Encoded string of the JSON to match to the data body
Body *RequestBulkRetryCreateRequestQueryBody `json:"body,omitempty" url:"body,omitempty"`
// URL Encoded string of the JSON to match to the parsed query (JSON representation of the query)
ParsedQuery *RequestBulkRetryCreateRequestQueryParsedQuery `json:"parsed_query,omitempty" url:"parsed_query,omitempty"`
// URL Encoded string of the value to match partially to the path
Path *string `json:"path,omitempty" url:"path,omitempty"`
// Filter by count of ignored events
IgnoredCount *RequestBulkRetryCreateRequestQueryIgnoredCount `json:"ignored_count,omitempty" url:"ignored_count,omitempty"`
// Filter by count of events
EventsCount *RequestBulkRetryCreateRequestQueryEventsCount `json:"events_count,omitempty" url:"events_count,omitempty"`
// Filter by event ingested date
IngestedAt *RequestBulkRetryCreateRequestQueryIngestedAt `json:"ingested_at,omitempty" url:"ingested_at,omitempty"`
BulkRetryId *RequestBulkRetryCreateRequestQueryBulkRetryId `json:"bulk_retry_id,omitempty" url:"bulk_retry_id,omitempty"`
extraProperties map[string]interface{}
_rawJSON json.RawMessage
}
func (r *RequestBulkRetryCreateRequestQuery) GetExtraProperties() map[string]interface{} {
return r.extraProperties
}
func (r *RequestBulkRetryCreateRequestQuery) UnmarshalJSON(data []byte) error {
type unmarshaler RequestBulkRetryCreateRequestQuery
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*r = RequestBulkRetryCreateRequestQuery(value)
extraProperties, err := core.ExtractExtraProperties(data, *r)
if err != nil {
return err
}
r.extraProperties = extraProperties
r._rawJSON = json.RawMessage(data)
return nil
}
func (r *RequestBulkRetryCreateRequestQuery) String() string {
if len(r._rawJSON) > 0 {
if value, err := core.StringifyJSON(r._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(r); err == nil {
return value
}
return fmt.Sprintf("%#v", r)
}
type RequestBulkRetryListRequestDir string
const (
RequestBulkRetryListRequestDirAsc RequestBulkRetryListRequestDir = "asc"
RequestBulkRetryListRequestDirDesc RequestBulkRetryListRequestDir = "desc"
)
func NewRequestBulkRetryListRequestDirFromString(s string) (RequestBulkRetryListRequestDir, error) {
switch s {
case "asc":
return RequestBulkRetryListRequestDirAsc, nil
case "desc":
return RequestBulkRetryListRequestDirDesc, nil
}
var t RequestBulkRetryListRequestDir
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (r RequestBulkRetryListRequestDir) Ptr() *RequestBulkRetryListRequestDir {
return &r
}
type RequestBulkRetryListRequestOrderBy string
const (
RequestBulkRetryListRequestOrderByCreatedAt RequestBulkRetryListRequestOrderBy = "created_at"
)
func NewRequestBulkRetryListRequestOrderByFromString(s string) (RequestBulkRetryListRequestOrderBy, error) {
switch s {
case "created_at":
return RequestBulkRetryListRequestOrderByCreatedAt, nil
}
var t RequestBulkRetryListRequestOrderBy
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (r RequestBulkRetryListRequestOrderBy) Ptr() *RequestBulkRetryListRequestOrderBy {
return &r
}
type RequestBulkRetryPlanResponse 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 (r *RequestBulkRetryPlanResponse) GetExtraProperties() map[string]interface{} {
return r.extraProperties
}
func (r *RequestBulkRetryPlanResponse) UnmarshalJSON(data []byte) error {
type unmarshaler RequestBulkRetryPlanResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*r = RequestBulkRetryPlanResponse(value)
extraProperties, err := core.ExtractExtraProperties(data, *r)
if err != nil {
return err
}
r.extraProperties = extraProperties
r._rawJSON = json.RawMessage(data)
return nil
}
func (r *RequestBulkRetryPlanResponse) String() string {
if len(r._rawJSON) > 0 {
if value, err := core.StringifyJSON(r._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(r); err == nil {
return value
}
return fmt.Sprintf("%#v", r)
}