@@ -38,7 +38,7 @@ func NewVersionService(opts ...option.RequestOption) (r *VersionService) {
38
38
}
39
39
40
40
// List deployed Workflow versions
41
- func (r * VersionService ) List (ctx context.Context , workflowName string , params VersionListParams , opts ... option.RequestOption ) (res * pagination.V4PagePagination [VersionListResponse ], err error ) {
41
+ func (r * VersionService ) List (ctx context.Context , workflowName string , params VersionListParams , opts ... option.RequestOption ) (res * pagination.V4PagePaginationArray [VersionListResponse ], err error ) {
42
42
var raw * http.Response
43
43
opts = append (r .Options [:], opts ... )
44
44
opts = append ([]option.RequestOption {option .WithResponseInto (& raw )}, opts ... )
@@ -64,8 +64,8 @@ func (r *VersionService) List(ctx context.Context, workflowName string, params V
64
64
}
65
65
66
66
// List deployed Workflow versions
67
- func (r * VersionService ) ListAutoPaging (ctx context.Context , workflowName string , params VersionListParams , opts ... option.RequestOption ) * pagination.V4PagePaginationAutoPager [VersionListResponse ] {
68
- return pagination .NewV4PagePaginationAutoPager (r .List (ctx , workflowName , params , opts ... ))
67
+ func (r * VersionService ) ListAutoPaging (ctx context.Context , workflowName string , params VersionListParams , opts ... option.RequestOption ) * pagination.V4PagePaginationArrayAutoPager [VersionListResponse ] {
68
+ return pagination .NewV4PagePaginationArrayAutoPager (r .List (ctx , workflowName , params , opts ... ))
69
69
}
70
70
71
71
// Get Workflow version details
@@ -94,92 +94,17 @@ func (r *VersionService) Get(ctx context.Context, workflowName string, versionID
94
94
}
95
95
96
96
type VersionListResponse struct {
97
- Errors [] VersionListResponseError `json:"errors ,required"`
98
- Messages [] VersionListResponseMessage `json:"messages ,required"`
99
- Result VersionListResponseResult `json:"result ,required"`
100
- Success VersionListResponseSuccess `json:"success ,required"`
101
- ResultInfo VersionListResponseResultInfo `json:"result_info "`
102
- JSON versionListResponseJSON `json:"-"`
97
+ ID string `json:"id ,required" format:"uuid "`
98
+ ClassName string `json:"class_name ,required"`
99
+ CreatedOn time. Time `json:"created_on ,required" format:"date-time "`
100
+ ModifiedOn time. Time `json:"modified_on ,required" format:"date-time "`
101
+ WorkflowID string `json:"workflow_id,required" format:"uuid "`
102
+ JSON versionListResponseJSON `json:"-"`
103
103
}
104
104
105
105
// versionListResponseJSON contains the JSON metadata for the struct
106
106
// [VersionListResponse]
107
107
type versionListResponseJSON struct {
108
- Errors apijson.Field
109
- Messages apijson.Field
110
- Result apijson.Field
111
- Success apijson.Field
112
- ResultInfo apijson.Field
113
- raw string
114
- ExtraFields map [string ]apijson.Field
115
- }
116
-
117
- func (r * VersionListResponse ) UnmarshalJSON (data []byte ) (err error ) {
118
- return apijson .UnmarshalRoot (data , r )
119
- }
120
-
121
- func (r versionListResponseJSON ) RawJSON () string {
122
- return r .raw
123
- }
124
-
125
- type VersionListResponseError struct {
126
- Code float64 `json:"code,required"`
127
- Message string `json:"message,required"`
128
- JSON versionListResponseErrorJSON `json:"-"`
129
- }
130
-
131
- // versionListResponseErrorJSON contains the JSON metadata for the struct
132
- // [VersionListResponseError]
133
- type versionListResponseErrorJSON struct {
134
- Code apijson.Field
135
- Message apijson.Field
136
- raw string
137
- ExtraFields map [string ]apijson.Field
138
- }
139
-
140
- func (r * VersionListResponseError ) UnmarshalJSON (data []byte ) (err error ) {
141
- return apijson .UnmarshalRoot (data , r )
142
- }
143
-
144
- func (r versionListResponseErrorJSON ) RawJSON () string {
145
- return r .raw
146
- }
147
-
148
- type VersionListResponseMessage struct {
149
- Code float64 `json:"code,required"`
150
- Message string `json:"message,required"`
151
- JSON versionListResponseMessageJSON `json:"-"`
152
- }
153
-
154
- // versionListResponseMessageJSON contains the JSON metadata for the struct
155
- // [VersionListResponseMessage]
156
- type versionListResponseMessageJSON struct {
157
- Code apijson.Field
158
- Message apijson.Field
159
- raw string
160
- ExtraFields map [string ]apijson.Field
161
- }
162
-
163
- func (r * VersionListResponseMessage ) UnmarshalJSON (data []byte ) (err error ) {
164
- return apijson .UnmarshalRoot (data , r )
165
- }
166
-
167
- func (r versionListResponseMessageJSON ) RawJSON () string {
168
- return r .raw
169
- }
170
-
171
- type VersionListResponseResult struct {
172
- ID string `json:"id,required" format:"uuid"`
173
- ClassName string `json:"class_name,required"`
174
- CreatedOn time.Time `json:"created_on,required" format:"date-time"`
175
- ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
176
- WorkflowID string `json:"workflow_id,required" format:"uuid"`
177
- JSON versionListResponseResultJSON `json:"-"`
178
- }
179
-
180
- // versionListResponseResultJSON contains the JSON metadata for the struct
181
- // [VersionListResponseResult]
182
- type versionListResponseResultJSON struct {
183
108
ID apijson.Field
184
109
ClassName apijson.Field
185
110
CreatedOn apijson.Field
@@ -189,52 +114,11 @@ type versionListResponseResultJSON struct {
189
114
ExtraFields map [string ]apijson.Field
190
115
}
191
116
192
- func (r * VersionListResponseResult ) UnmarshalJSON (data []byte ) (err error ) {
193
- return apijson .UnmarshalRoot (data , r )
194
- }
195
-
196
- func (r versionListResponseResultJSON ) RawJSON () string {
197
- return r .raw
198
- }
199
-
200
- type VersionListResponseSuccess bool
201
-
202
- const (
203
- VersionListResponseSuccessTrue VersionListResponseSuccess = true
204
- )
205
-
206
- func (r VersionListResponseSuccess ) IsKnown () bool {
207
- switch r {
208
- case VersionListResponseSuccessTrue :
209
- return true
210
- }
211
- return false
212
- }
213
-
214
- type VersionListResponseResultInfo struct {
215
- Count float64 `json:"count,required"`
216
- Page float64 `json:"page,required"`
217
- PerPage float64 `json:"per_page,required"`
218
- TotalCount float64 `json:"total_count,required"`
219
- JSON versionListResponseResultInfoJSON `json:"-"`
220
- }
221
-
222
- // versionListResponseResultInfoJSON contains the JSON metadata for the struct
223
- // [VersionListResponseResultInfo]
224
- type versionListResponseResultInfoJSON struct {
225
- Count apijson.Field
226
- Page apijson.Field
227
- PerPage apijson.Field
228
- TotalCount apijson.Field
229
- raw string
230
- ExtraFields map [string ]apijson.Field
231
- }
232
-
233
- func (r * VersionListResponseResultInfo ) UnmarshalJSON (data []byte ) (err error ) {
117
+ func (r * VersionListResponse ) UnmarshalJSON (data []byte ) (err error ) {
234
118
return apijson .UnmarshalRoot (data , r )
235
119
}
236
120
237
- func (r versionListResponseResultInfoJSON ) RawJSON () string {
121
+ func (r versionListResponseJSON ) RawJSON () string {
238
122
return r .raw
239
123
}
240
124
0 commit comments