Skip to content

Commit 915af77

Browse files
feat(api): api update
1 parent 9fd2355 commit 915af77

File tree

3 files changed

+137
-7
lines changed

3 files changed

+137
-7
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 15
2-
openapi_spec_hash: 9a0b363025305f6b086bcdfe43274830
2+
openapi_spec_hash: c01d40349b63e0d636eb3ae352a41341
33
config_hash: 21fb9730d1cdc9e3fd38724c4774b894

committestresult.go

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,15 @@ func (r commitTestResultListResponseItemsGoalJSON) RawJSON() string {
229229

230230
type CommitTestResultListResponseItemsGoalThreshold struct {
231231
// The insight name to be evaluated.
232-
InsightName string `json:"insightName"`
233-
InsightParameters []interface{} `json:"insightParameters"`
232+
InsightName string `json:"insightName"`
233+
// The insight parameters. Required only for some test subtypes.
234+
InsightParameters []CommitTestResultListResponseItemsGoalThresholdsInsightParameter `json:"insightParameters,nullable"`
234235
// The measurement to be evaluated.
235236
Measurement string `json:"measurement"`
236237
// The operator to be used for the evaluation.
237-
Operator string `json:"operator"`
238+
Operator CommitTestResultListResponseItemsGoalThresholdsOperator `json:"operator"`
239+
// Whether to use automatic anomaly detection or manual thresholds
240+
ThresholdMode CommitTestResultListResponseItemsGoalThresholdsThresholdMode `json:"thresholdMode"`
238241
// The value to be compared.
239242
Value CommitTestResultListResponseItemsGoalThresholdsValueUnion `json:"value"`
240243
JSON commitTestResultListResponseItemsGoalThresholdJSON `json:"-"`
@@ -247,6 +250,7 @@ type commitTestResultListResponseItemsGoalThresholdJSON struct {
247250
InsightParameters apijson.Field
248251
Measurement apijson.Field
249252
Operator apijson.Field
253+
ThresholdMode apijson.Field
250254
Value apijson.Field
251255
raw string
252256
ExtraFields map[string]apijson.Field
@@ -260,6 +264,67 @@ func (r commitTestResultListResponseItemsGoalThresholdJSON) RawJSON() string {
260264
return r.raw
261265
}
262266

267+
type CommitTestResultListResponseItemsGoalThresholdsInsightParameter struct {
268+
// The name of the insight filter.
269+
Name string `json:"name,required"`
270+
Value interface{} `json:"value,required"`
271+
JSON commitTestResultListResponseItemsGoalThresholdsInsightParameterJSON `json:"-"`
272+
}
273+
274+
// commitTestResultListResponseItemsGoalThresholdsInsightParameterJSON contains the
275+
// JSON metadata for the struct
276+
// [CommitTestResultListResponseItemsGoalThresholdsInsightParameter]
277+
type commitTestResultListResponseItemsGoalThresholdsInsightParameterJSON struct {
278+
Name apijson.Field
279+
Value apijson.Field
280+
raw string
281+
ExtraFields map[string]apijson.Field
282+
}
283+
284+
func (r *CommitTestResultListResponseItemsGoalThresholdsInsightParameter) UnmarshalJSON(data []byte) (err error) {
285+
return apijson.UnmarshalRoot(data, r)
286+
}
287+
288+
func (r commitTestResultListResponseItemsGoalThresholdsInsightParameterJSON) RawJSON() string {
289+
return r.raw
290+
}
291+
292+
// The operator to be used for the evaluation.
293+
type CommitTestResultListResponseItemsGoalThresholdsOperator string
294+
295+
const (
296+
CommitTestResultListResponseItemsGoalThresholdsOperatorIs CommitTestResultListResponseItemsGoalThresholdsOperator = "is"
297+
CommitTestResultListResponseItemsGoalThresholdsOperatorGreater CommitTestResultListResponseItemsGoalThresholdsOperator = ">"
298+
CommitTestResultListResponseItemsGoalThresholdsOperatorGreaterOrEquals CommitTestResultListResponseItemsGoalThresholdsOperator = ">="
299+
CommitTestResultListResponseItemsGoalThresholdsOperatorLess CommitTestResultListResponseItemsGoalThresholdsOperator = "<"
300+
CommitTestResultListResponseItemsGoalThresholdsOperatorLessOrEquals CommitTestResultListResponseItemsGoalThresholdsOperator = "<="
301+
CommitTestResultListResponseItemsGoalThresholdsOperatorNotEquals CommitTestResultListResponseItemsGoalThresholdsOperator = "!="
302+
)
303+
304+
func (r CommitTestResultListResponseItemsGoalThresholdsOperator) IsKnown() bool {
305+
switch r {
306+
case CommitTestResultListResponseItemsGoalThresholdsOperatorIs, CommitTestResultListResponseItemsGoalThresholdsOperatorGreater, CommitTestResultListResponseItemsGoalThresholdsOperatorGreaterOrEquals, CommitTestResultListResponseItemsGoalThresholdsOperatorLess, CommitTestResultListResponseItemsGoalThresholdsOperatorLessOrEquals, CommitTestResultListResponseItemsGoalThresholdsOperatorNotEquals:
307+
return true
308+
}
309+
return false
310+
}
311+
312+
// Whether to use automatic anomaly detection or manual thresholds
313+
type CommitTestResultListResponseItemsGoalThresholdsThresholdMode string
314+
315+
const (
316+
CommitTestResultListResponseItemsGoalThresholdsThresholdModeAutomatic CommitTestResultListResponseItemsGoalThresholdsThresholdMode = "automatic"
317+
CommitTestResultListResponseItemsGoalThresholdsThresholdModeManual CommitTestResultListResponseItemsGoalThresholdsThresholdMode = "manual"
318+
)
319+
320+
func (r CommitTestResultListResponseItemsGoalThresholdsThresholdMode) IsKnown() bool {
321+
switch r {
322+
case CommitTestResultListResponseItemsGoalThresholdsThresholdModeAutomatic, CommitTestResultListResponseItemsGoalThresholdsThresholdModeManual:
323+
return true
324+
}
325+
return false
326+
}
327+
263328
// The value to be compared.
264329
//
265330
// Union satisfied by [shared.UnionFloat], [shared.UnionBool], [shared.UnionString]

inferencepipelinetestresult.go

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,15 @@ func (r inferencePipelineTestResultListResponseItemsGoalJSON) RawJSON() string {
229229

230230
type InferencePipelineTestResultListResponseItemsGoalThreshold struct {
231231
// The insight name to be evaluated.
232-
InsightName string `json:"insightName"`
233-
InsightParameters []interface{} `json:"insightParameters"`
232+
InsightName string `json:"insightName"`
233+
// The insight parameters. Required only for some test subtypes.
234+
InsightParameters []InferencePipelineTestResultListResponseItemsGoalThresholdsInsightParameter `json:"insightParameters,nullable"`
234235
// The measurement to be evaluated.
235236
Measurement string `json:"measurement"`
236237
// The operator to be used for the evaluation.
237-
Operator string `json:"operator"`
238+
Operator InferencePipelineTestResultListResponseItemsGoalThresholdsOperator `json:"operator"`
239+
// Whether to use automatic anomaly detection or manual thresholds
240+
ThresholdMode InferencePipelineTestResultListResponseItemsGoalThresholdsThresholdMode `json:"thresholdMode"`
238241
// The value to be compared.
239242
Value InferencePipelineTestResultListResponseItemsGoalThresholdsValueUnion `json:"value"`
240243
JSON inferencePipelineTestResultListResponseItemsGoalThresholdJSON `json:"-"`
@@ -248,6 +251,7 @@ type inferencePipelineTestResultListResponseItemsGoalThresholdJSON struct {
248251
InsightParameters apijson.Field
249252
Measurement apijson.Field
250253
Operator apijson.Field
254+
ThresholdMode apijson.Field
251255
Value apijson.Field
252256
raw string
253257
ExtraFields map[string]apijson.Field
@@ -261,6 +265,67 @@ func (r inferencePipelineTestResultListResponseItemsGoalThresholdJSON) RawJSON()
261265
return r.raw
262266
}
263267

268+
type InferencePipelineTestResultListResponseItemsGoalThresholdsInsightParameter struct {
269+
// The name of the insight filter.
270+
Name string `json:"name,required"`
271+
Value interface{} `json:"value,required"`
272+
JSON inferencePipelineTestResultListResponseItemsGoalThresholdsInsightParameterJSON `json:"-"`
273+
}
274+
275+
// inferencePipelineTestResultListResponseItemsGoalThresholdsInsightParameterJSON
276+
// contains the JSON metadata for the struct
277+
// [InferencePipelineTestResultListResponseItemsGoalThresholdsInsightParameter]
278+
type inferencePipelineTestResultListResponseItemsGoalThresholdsInsightParameterJSON struct {
279+
Name apijson.Field
280+
Value apijson.Field
281+
raw string
282+
ExtraFields map[string]apijson.Field
283+
}
284+
285+
func (r *InferencePipelineTestResultListResponseItemsGoalThresholdsInsightParameter) UnmarshalJSON(data []byte) (err error) {
286+
return apijson.UnmarshalRoot(data, r)
287+
}
288+
289+
func (r inferencePipelineTestResultListResponseItemsGoalThresholdsInsightParameterJSON) RawJSON() string {
290+
return r.raw
291+
}
292+
293+
// The operator to be used for the evaluation.
294+
type InferencePipelineTestResultListResponseItemsGoalThresholdsOperator string
295+
296+
const (
297+
InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorIs InferencePipelineTestResultListResponseItemsGoalThresholdsOperator = "is"
298+
InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorGreater InferencePipelineTestResultListResponseItemsGoalThresholdsOperator = ">"
299+
InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorGreaterOrEquals InferencePipelineTestResultListResponseItemsGoalThresholdsOperator = ">="
300+
InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorLess InferencePipelineTestResultListResponseItemsGoalThresholdsOperator = "<"
301+
InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorLessOrEquals InferencePipelineTestResultListResponseItemsGoalThresholdsOperator = "<="
302+
InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorNotEquals InferencePipelineTestResultListResponseItemsGoalThresholdsOperator = "!="
303+
)
304+
305+
func (r InferencePipelineTestResultListResponseItemsGoalThresholdsOperator) IsKnown() bool {
306+
switch r {
307+
case InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorIs, InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorGreater, InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorGreaterOrEquals, InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorLess, InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorLessOrEquals, InferencePipelineTestResultListResponseItemsGoalThresholdsOperatorNotEquals:
308+
return true
309+
}
310+
return false
311+
}
312+
313+
// Whether to use automatic anomaly detection or manual thresholds
314+
type InferencePipelineTestResultListResponseItemsGoalThresholdsThresholdMode string
315+
316+
const (
317+
InferencePipelineTestResultListResponseItemsGoalThresholdsThresholdModeAutomatic InferencePipelineTestResultListResponseItemsGoalThresholdsThresholdMode = "automatic"
318+
InferencePipelineTestResultListResponseItemsGoalThresholdsThresholdModeManual InferencePipelineTestResultListResponseItemsGoalThresholdsThresholdMode = "manual"
319+
)
320+
321+
func (r InferencePipelineTestResultListResponseItemsGoalThresholdsThresholdMode) IsKnown() bool {
322+
switch r {
323+
case InferencePipelineTestResultListResponseItemsGoalThresholdsThresholdModeAutomatic, InferencePipelineTestResultListResponseItemsGoalThresholdsThresholdModeManual:
324+
return true
325+
}
326+
return false
327+
}
328+
264329
// The value to be compared.
265330
//
266331
// Union satisfied by [shared.UnionFloat], [shared.UnionBool], [shared.UnionString]

0 commit comments

Comments
 (0)