From d261effa0a43f5d28be10578e0369105dd47ab76 Mon Sep 17 00:00:00 2001 From: Create or Update Pull Request Action Date: Tue, 28 May 2024 16:14:00 +0000 Subject: [PATCH] Horreum client updated --- .../run_item_label_values_request_builder.go | 4 +- .../test_item_label_values_request_builder.go | 4 +- pkg/raw_client/kiota-lock.json | 2 +- pkg/raw_client/models/dataset.go | 157 ++---------------- pkg/raw_client/models/dataset_access.go | 40 ----- 5 files changed, 21 insertions(+), 186 deletions(-) delete mode 100644 pkg/raw_client/models/dataset_access.go diff --git a/pkg/raw_client/api/run_item_label_values_request_builder.go b/pkg/raw_client/api/run_item_label_values_request_builder.go index 9ddbae5..71214ed 100644 --- a/pkg/raw_client/api/run_item_label_values_request_builder.go +++ b/pkg/raw_client/api/run_item_label_values_request_builder.go @@ -22,6 +22,8 @@ type RunItemLabelValuesRequestBuilderGetQueryParameters struct { Include []string `uriparametername:"include"` // the maximum number of results to include Limit *int32 `uriparametername:"limit"` + // enable filtering for multiple values with an array of values + MultiFilter *bool `uriparametername:"multiFilter"` // which page to skip to when using a limit Page *int32 `uriparametername:"page"` // label name for sorting @@ -39,7 +41,7 @@ type RunItemLabelValuesRequestBuilderGetRequestConfiguration struct { // NewRunItemLabelValuesRequestBuilderInternal instantiates a new RunItemLabelValuesRequestBuilder and sets the default values. func NewRunItemLabelValuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RunItemLabelValuesRequestBuilder) { m := &RunItemLabelValuesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/api/run/{id}/labelValues{?direction*,exclude*,filter*,include*,limit*,page*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/api/run/{id}/labelValues{?direction*,exclude*,filter*,include*,limit*,multiFilter*,page*,sort*}", pathParameters), } return m } diff --git a/pkg/raw_client/api/test_item_label_values_request_builder.go b/pkg/raw_client/api/test_item_label_values_request_builder.go index d28b075..4b135d0 100644 --- a/pkg/raw_client/api/test_item_label_values_request_builder.go +++ b/pkg/raw_client/api/test_item_label_values_request_builder.go @@ -30,6 +30,8 @@ type TestItemLabelValuesRequestBuilderGetQueryParameters struct { Limit *int32 `uriparametername:"limit"` // Retrieve values for Metric Labels Metrics *bool `uriparametername:"metrics"` + // enable filtering for multiple values with an array of values + MultiFilter *bool `uriparametername:"multiFilter"` // which page to skip to when using a limit Page *int32 `uriparametername:"page"` // json path to sortable value or start or stop for sorting by time @@ -47,7 +49,7 @@ type TestItemLabelValuesRequestBuilderGetRequestConfiguration struct { // NewTestItemLabelValuesRequestBuilderInternal instantiates a new TestItemLabelValuesRequestBuilder and sets the default values. func NewTestItemLabelValuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TestItemLabelValuesRequestBuilder) { m := &TestItemLabelValuesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/api/test/{id}/labelValues{?after*,before*,direction*,exclude*,filter*,filtering*,include*,limit*,metrics*,page*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/api/test/{id}/labelValues{?after*,before*,direction*,exclude*,filter*,filtering*,include*,limit*,metrics*,multiFilter*,page*,sort*}", pathParameters), } return m } diff --git a/pkg/raw_client/kiota-lock.json b/pkg/raw_client/kiota-lock.json index aeef848..2d99994 100644 --- a/pkg/raw_client/kiota-lock.json +++ b/pkg/raw_client/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "32D7E208EFBDEE46CCD4C5C875F618A597C0461871077214F1A0EB0E978E7A7A6555E3FA2F995F9AB7CFC277DFE1B084D7BFDB9D6D4A7D1173BF3796EBC47183", + "descriptionHash": "C2A4258B07C662D6EBE2A04A0E2788D439B54622C55776B64BB5F06CF1476B24CA20AFCFF1C0B63ECEDF1EB9A43C113F7F741C08431FC8FC4A9442002D6ACA62", "descriptionLocation": "../../openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.14.0", diff --git a/pkg/raw_client/models/dataset.go b/pkg/raw_client/models/dataset.go index f8197ab..4042097 100644 --- a/pkg/raw_client/models/dataset.go +++ b/pkg/raw_client/models/dataset.go @@ -6,10 +6,7 @@ import ( // Dataset a dataset is the JSON document used as the basis for all comparisons and reporting type Dataset struct { - // Access rights for the test. This defines the visibility of the Test in the UI - access *Dataset_access - // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additionalData map[string]any + ProtectedTimeType // Data payload data *string // Run description @@ -18,14 +15,8 @@ type Dataset struct { id *int32 // Dataset ordinal for ordered list of Datasets derived from a Run ordinal *int32 - // Name of the team that owns the test. Users must belong to the team that owns a test to make modifications - owner *string // Run ID that Dataset relates to runId *int32 - // Run Start timestamp - start *int64 - // Run Stop timestamp - stop *int64 // Test ID that Dataset relates to testid *int32 // List of Validation Errors @@ -34,8 +25,8 @@ type Dataset struct { // NewDataset instantiates a new Dataset and sets the default values. func NewDataset()(*Dataset) { m := &Dataset{ + ProtectedTimeType: *NewProtectedTimeType(), } - m.SetAdditionalData(make(map[string]any)) return m } // CreateDatasetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value @@ -43,16 +34,6 @@ func NewDataset()(*Dataset) { func CreateDatasetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewDataset(), nil } -// GetAccess gets the access property value. Access rights for the test. This defines the visibility of the Test in the UI -// returns a *Dataset_access when successful -func (m *Dataset) GetAccess()(*Dataset_access) { - return m.access -} -// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -// returns a map[string]any when successful -func (m *Dataset) GetAdditionalData()(map[string]any) { - return m.additionalData -} // GetData gets the data property value. Data payload // returns a *string when successful func (m *Dataset) GetData()(*string) { @@ -66,17 +47,7 @@ func (m *Dataset) GetDescription()(*string) { // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Dataset) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["access"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetEnumValue(ParseDataset_access) - if err != nil { - return err - } - if val != nil { - m.SetAccess(val.(*Dataset_access)) - } - return nil - } + res := m.ProtectedTimeType.GetFieldDeserializers() res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -117,16 +88,6 @@ func (m *Dataset) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268963 } return nil } - res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOwner(val) - } - return nil - } res["runId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetInt32Value() if err != nil { @@ -137,26 +98,6 @@ func (m *Dataset) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268963 } return nil } - res["start"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt64Value() - if err != nil { - return err - } - if val != nil { - m.SetStart(val) - } - return nil - } - res["stop"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt64Value() - if err != nil { - return err - } - if val != nil { - m.SetStop(val) - } - return nil - } res["testid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetInt32Value() if err != nil { @@ -195,26 +136,11 @@ func (m *Dataset) GetId()(*int32) { func (m *Dataset) GetOrdinal()(*int32) { return m.ordinal } -// GetOwner gets the owner property value. Name of the team that owns the test. Users must belong to the team that owns a test to make modifications -// returns a *string when successful -func (m *Dataset) GetOwner()(*string) { - return m.owner -} // GetRunId gets the runId property value. Run ID that Dataset relates to // returns a *int32 when successful func (m *Dataset) GetRunId()(*int32) { return m.runId } -// GetStart gets the start property value. Run Start timestamp -// returns a *int64 when successful -func (m *Dataset) GetStart()(*int64) { - return m.start -} -// GetStop gets the stop property value. Run Stop timestamp -// returns a *int64 when successful -func (m *Dataset) GetStop()(*int64) { - return m.stop -} // GetTestid gets the testid property value. Test ID that Dataset relates to // returns a *int32 when successful func (m *Dataset) GetTestid()(*int32) { @@ -227,63 +153,42 @@ func (m *Dataset) GetValidationErrors()([]ValidationErrorable) { } // Serialize serializes information the current object func (m *Dataset) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetAccess() != nil { - cast := (*m.GetAccess()).String() - err := writer.WriteStringValue("access", &cast) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("data", m.GetData()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("description", m.GetDescription()) - if err != nil { - return err - } + err := m.ProtectedTimeType.Serialize(writer) + if err != nil { + return err } { - err := writer.WriteInt32Value("id", m.GetId()) + err = writer.WriteStringValue("data", m.GetData()) if err != nil { return err } } { - err := writer.WriteInt32Value("ordinal", m.GetOrdinal()) + err = writer.WriteStringValue("description", m.GetDescription()) if err != nil { return err } } { - err := writer.WriteStringValue("owner", m.GetOwner()) + err = writer.WriteInt32Value("id", m.GetId()) if err != nil { return err } } { - err := writer.WriteInt32Value("runId", m.GetRunId()) + err = writer.WriteInt32Value("ordinal", m.GetOrdinal()) if err != nil { return err } } { - err := writer.WriteInt64Value("start", m.GetStart()) + err = writer.WriteInt32Value("runId", m.GetRunId()) if err != nil { return err } } { - err := writer.WriteInt64Value("stop", m.GetStop()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("testid", m.GetTestid()) + err = writer.WriteInt32Value("testid", m.GetTestid()) if err != nil { return err } @@ -295,27 +200,13 @@ func (m *Dataset) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010 cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) } } - err := writer.WriteCollectionOfObjectValues("validationErrors", cast) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) + err = writer.WriteCollectionOfObjectValues("validationErrors", cast) if err != nil { return err } } return nil } -// SetAccess sets the access property value. Access rights for the test. This defines the visibility of the Test in the UI -func (m *Dataset) SetAccess(value *Dataset_access)() { - m.access = value -} -// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *Dataset) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} // SetData sets the data property value. Data payload func (m *Dataset) SetData(value *string)() { m.data = value @@ -332,22 +223,10 @@ func (m *Dataset) SetId(value *int32)() { func (m *Dataset) SetOrdinal(value *int32)() { m.ordinal = value } -// SetOwner sets the owner property value. Name of the team that owns the test. Users must belong to the team that owns a test to make modifications -func (m *Dataset) SetOwner(value *string)() { - m.owner = value -} // SetRunId sets the runId property value. Run ID that Dataset relates to func (m *Dataset) SetRunId(value *int32)() { m.runId = value } -// SetStart sets the start property value. Run Start timestamp -func (m *Dataset) SetStart(value *int64)() { - m.start = value -} -// SetStop sets the stop property value. Run Stop timestamp -func (m *Dataset) SetStop(value *int64)() { - m.stop = value -} // SetTestid sets the testid property value. Test ID that Dataset relates to func (m *Dataset) SetTestid(value *int32)() { m.testid = value @@ -357,28 +236,20 @@ func (m *Dataset) SetValidationErrors(value []ValidationErrorable)() { m.validationErrors = value } type Datasetable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAccess()(*Dataset_access) + ProtectedTimeTypeable GetData()(*string) GetDescription()(*string) GetId()(*int32) GetOrdinal()(*int32) - GetOwner()(*string) GetRunId()(*int32) - GetStart()(*int64) - GetStop()(*int64) GetTestid()(*int32) GetValidationErrors()([]ValidationErrorable) - SetAccess(value *Dataset_access)() SetData(value *string)() SetDescription(value *string)() SetId(value *int32)() SetOrdinal(value *int32)() - SetOwner(value *string)() SetRunId(value *int32)() - SetStart(value *int64)() - SetStop(value *int64)() SetTestid(value *int32)() SetValidationErrors(value []ValidationErrorable)() } diff --git a/pkg/raw_client/models/dataset_access.go b/pkg/raw_client/models/dataset_access.go deleted file mode 100644 index f31ba75..0000000 --- a/pkg/raw_client/models/dataset_access.go +++ /dev/null @@ -1,40 +0,0 @@ -package models -import ( - "errors" -) -// Access rights for the test. This defines the visibility of the Test in the UI -type Dataset_access int - -const ( - PUBLIC_DATASET_ACCESS Dataset_access = iota - PROTECTED_DATASET_ACCESS - PRIVATE_DATASET_ACCESS -) - -func (i Dataset_access) String() string { - return []string{"PUBLIC", "PROTECTED", "PRIVATE"}[i] -} -func ParseDataset_access(v string) (any, error) { - result := PUBLIC_DATASET_ACCESS - switch v { - case "PUBLIC": - result = PUBLIC_DATASET_ACCESS - case "PROTECTED": - result = PROTECTED_DATASET_ACCESS - case "PRIVATE": - result = PRIVATE_DATASET_ACCESS - default: - return 0, errors.New("Unknown Dataset_access value: " + v) - } - return &result, nil -} -func SerializeDataset_access(values []Dataset_access) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result -} -func (i Dataset_access) isMultiValue() bool { - return false -}