From 3d120bbc2e2a9dba9a134ace12a2b5c7c02cabbc Mon Sep 17 00:00:00 2001 From: Deon Taljaard Date: Thu, 16 Apr 2026 16:12:28 +0200 Subject: [PATCH 1/2] STAC-24562: update stackstate openapi models after otel input action field type change # Conflicts: # stackstate_openapi/openapi_version --- .../stackstate_api/.openapi-generator/FILES | 2 - generated/stackstate_api/README.md | 1 - generated/stackstate_api/api/openapi.yaml | 111 ++++++++++-------- .../docs/OtelInputConditionAction.md | 13 -- .../stackstate_api/docs/OtelInputDatapoint.md | 8 +- generated/stackstate_api/docs/OtelInputLog.md | 8 +- .../stackstate_api/docs/OtelInputMetric.md | 8 +- .../stackstate_api/docs/OtelInputResource.md | 8 +- .../stackstate_api/docs/OtelInputScope.md | 8 +- .../stackstate_api/docs/OtelInputSpan.md | 8 +- .../model_otel_input_condition_action.go | 111 ------------------ .../model_otel_input_datapoint.go | 15 +-- .../stackstate_api/model_otel_input_log.go | 15 +-- .../stackstate_api/model_otel_input_metric.go | 17 +-- .../model_otel_input_resource.go | 17 +-- .../stackstate_api/model_otel_input_scope.go | 21 ++-- .../stackstate_api/model_otel_input_span.go | 15 +-- 17 files changed, 139 insertions(+), 247 deletions(-) delete mode 100644 generated/stackstate_api/docs/OtelInputConditionAction.md delete mode 100644 generated/stackstate_api/model_otel_input_condition_action.go diff --git a/generated/stackstate_api/.openapi-generator/FILES b/generated/stackstate_api/.openapi-generator/FILES index 9e65fd57..ca6f0818 100644 --- a/generated/stackstate_api/.openapi-generator/FILES +++ b/generated/stackstate_api/.openapi-generator/FILES @@ -376,7 +376,6 @@ docs/OtelComponentMapping.md docs/OtelComponentMappingFieldMapping.md docs/OtelComponentMappingOutput.md docs/OtelInput.md -docs/OtelInputConditionAction.md docs/OtelInputDatapoint.md docs/OtelInputLog.md docs/OtelInputMetric.md @@ -945,7 +944,6 @@ model_otel_component_mapping.go model_otel_component_mapping_field_mapping.go model_otel_component_mapping_output.go model_otel_input.go -model_otel_input_condition_action.go model_otel_input_datapoint.go model_otel_input_log.go model_otel_input_metric.go diff --git a/generated/stackstate_api/README.md b/generated/stackstate_api/README.md index ec715e98..4e52fd63 100644 --- a/generated/stackstate_api/README.md +++ b/generated/stackstate_api/README.md @@ -577,7 +577,6 @@ Class | Method | HTTP request | Description - [OtelComponentMappingFieldMapping](docs/OtelComponentMappingFieldMapping.md) - [OtelComponentMappingOutput](docs/OtelComponentMappingOutput.md) - [OtelInput](docs/OtelInput.md) - - [OtelInputConditionAction](docs/OtelInputConditionAction.md) - [OtelInputDatapoint](docs/OtelInputDatapoint.md) - [OtelInputLog](docs/OtelInputLog.md) - [OtelInputMetric](docs/OtelInputMetric.md) diff --git a/generated/stackstate_api/api/openapi.yaml b/generated/stackstate_api/api/openapi.yaml index df4af706..43041df4 100644 --- a/generated/stackstate_api/api/openapi.yaml +++ b/generated/stackstate_api/api/openapi.yaml @@ -16595,16 +16595,16 @@ components: condition: condition datapoint: condition: condition - action: null - action: null + action: action + action: action log: condition: condition - action: null - action: null + action: action + action: action span: condition: condition - action: null - action: null + action: action + action: action signal: - null - null @@ -16657,32 +16657,35 @@ components: condition: condition datapoint: condition: condition - action: null - action: null + action: action + action: action log: condition: condition - action: null - action: null + action: action + action: action span: condition: condition - action: null - action: null + action: action + action: action properties: condition: description: A Cel expression that must return a boolean type: string action: - $ref: '#/components/schemas/OtelInputConditionAction' + description: "An expression that must produce a string. It must be one of\ + \ these formats:\n - A plain string, for example `\"this is a plain string\"\ + `\n - A cel expression that must return a string, for example: `resource.attributes['service.namespace']`" + type: string scope: $ref: '#/components/schemas/OtelInputScope' type: object OtelBooleanExpression: description: A Cel expression that must return a boolean type: string - OtelInputConditionAction: - enum: - - CREATE - - CONTINUE + OtelStringExpression: + description: "An expression that must produce a string. It must be one of these\ + \ formats:\n - A plain string, for example `\"this is a plain string\"`\n\ + \ - A cel expression that must return a string, for example: `resource.attributes['service.namespace']`" type: string OtelInputScope: description: "Defines conditional mapping at the resource -> scope level.\n\ @@ -16693,21 +16696,24 @@ components: condition: condition datapoint: condition: condition - action: null - action: null + action: action + action: action log: condition: condition - action: null - action: null + action: action + action: action span: condition: condition - action: null + action: action properties: condition: description: A Cel expression that must return a boolean type: string action: - $ref: '#/components/schemas/OtelInputConditionAction' + description: "An expression that must produce a string. It must be one of\ + \ these formats:\n - A plain string, for example `\"this is a plain string\"\ + `\n - A cel expression that must return a string, for example: `resource.attributes['service.namespace']`" + type: string metric: $ref: '#/components/schemas/OtelInputMetric' span: @@ -16723,14 +16729,17 @@ components: condition: condition datapoint: condition: condition - action: null - action: null + action: action + action: action properties: condition: description: A Cel expression that must return a boolean type: string action: - $ref: '#/components/schemas/OtelInputConditionAction' + description: "An expression that must produce a string. It must be one of\ + \ these formats:\n - A plain string, for example `\"this is a plain string\"\ + `\n - A cel expression that must return a string, for example: `resource.attributes['service.namespace']`" + type: string datapoint: $ref: '#/components/schemas/OtelInputDatapoint' type: object @@ -16740,39 +16749,48 @@ components: \ defaults to `CONTINUE`." example: condition: condition - action: null + action: action properties: condition: description: A Cel expression that must return a boolean type: string action: - $ref: '#/components/schemas/OtelInputConditionAction' + description: "An expression that must produce a string. It must be one of\ + \ these formats:\n - A plain string, for example `\"this is a plain string\"\ + `\n - A cel expression that must return a string, for example: `resource.attributes['service.namespace']`" + type: string type: object OtelInputSpan: description: "Defines conditional mapping at the resource -> scope -> span level.\n\ If omitted, `condition` defaults to `true` and `action` defaults to `CONTINUE`." example: condition: condition - action: null + action: action properties: condition: description: A Cel expression that must return a boolean type: string action: - $ref: '#/components/schemas/OtelInputConditionAction' + description: "An expression that must produce a string. It must be one of\ + \ these formats:\n - A plain string, for example `\"this is a plain string\"\ + `\n - A cel expression that must return a string, for example: `resource.attributes['service.namespace']`" + type: string type: object OtelInputLog: description: "Defines conditional mapping at the resource -> scope -> log level.\n\ If omitted, `condition` defaults to `true` and `action` defaults to `CONTINUE`." example: condition: condition - action: null + action: action properties: condition: description: A Cel expression that must return a boolean type: string action: - $ref: '#/components/schemas/OtelInputConditionAction' + description: "An expression that must produce a string. It must be one of\ + \ these formats:\n - A plain string, for example `\"this is a plain string\"\ + `\n - A cel expression that must return a string, for example: `resource.attributes['service.namespace']`" + type: string type: object OtelComponentMappingOutput: example: @@ -16864,11 +16882,6 @@ components: - name - typeName type: object - OtelStringExpression: - description: "An expression that must produce a string. It must be one of these\ - \ formats:\n - A plain string, for example `\"this is a plain string\"`\n\ - \ - A cel expression that must return a string, for example: `resource.attributes['service.namespace']`" - type: string OtelComponentMappingFieldMapping: example: configuration: configuration @@ -17013,16 +17026,16 @@ components: condition: condition datapoint: condition: condition - action: null - action: null + action: action + action: action log: condition: condition - action: null - action: null + action: action + action: action span: condition: condition - action: null - action: null + action: action + action: action signal: - null - null @@ -17205,16 +17218,16 @@ components: condition: condition datapoint: condition: condition - action: null - action: null + action: action + action: action log: condition: condition - action: null - action: null + action: action + action: action span: condition: condition - action: null - action: null + action: action + action: action signal: - null - null diff --git a/generated/stackstate_api/docs/OtelInputConditionAction.md b/generated/stackstate_api/docs/OtelInputConditionAction.md deleted file mode 100644 index 767afc8c..00000000 --- a/generated/stackstate_api/docs/OtelInputConditionAction.md +++ /dev/null @@ -1,13 +0,0 @@ -# OtelInputConditionAction - -## Enum - - -* `CREATE` (value: `"CREATE"`) - -* `CONTINUE` (value: `"CONTINUE"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/stackstate_api/docs/OtelInputDatapoint.md b/generated/stackstate_api/docs/OtelInputDatapoint.md index 44aaad8f..052ecdcc 100644 --- a/generated/stackstate_api/docs/OtelInputDatapoint.md +++ b/generated/stackstate_api/docs/OtelInputDatapoint.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Condition** | Pointer to **string** | A Cel expression that must return a boolean | [optional] -**Action** | Pointer to [**OtelInputConditionAction**](OtelInputConditionAction.md) | | [optional] +**Action** | Pointer to **string** | An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` | [optional] ## Methods @@ -53,20 +53,20 @@ HasCondition returns a boolean if a field has been set. ### GetAction -`func (o *OtelInputDatapoint) GetAction() OtelInputConditionAction` +`func (o *OtelInputDatapoint) GetAction() string` GetAction returns the Action field if non-nil, zero value otherwise. ### GetActionOk -`func (o *OtelInputDatapoint) GetActionOk() (*OtelInputConditionAction, bool)` +`func (o *OtelInputDatapoint) GetActionOk() (*string, bool)` GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAction -`func (o *OtelInputDatapoint) SetAction(v OtelInputConditionAction)` +`func (o *OtelInputDatapoint) SetAction(v string)` SetAction sets Action field to given value. diff --git a/generated/stackstate_api/docs/OtelInputLog.md b/generated/stackstate_api/docs/OtelInputLog.md index 87e4606a..a142bbb7 100644 --- a/generated/stackstate_api/docs/OtelInputLog.md +++ b/generated/stackstate_api/docs/OtelInputLog.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Condition** | Pointer to **string** | A Cel expression that must return a boolean | [optional] -**Action** | Pointer to [**OtelInputConditionAction**](OtelInputConditionAction.md) | | [optional] +**Action** | Pointer to **string** | An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` | [optional] ## Methods @@ -53,20 +53,20 @@ HasCondition returns a boolean if a field has been set. ### GetAction -`func (o *OtelInputLog) GetAction() OtelInputConditionAction` +`func (o *OtelInputLog) GetAction() string` GetAction returns the Action field if non-nil, zero value otherwise. ### GetActionOk -`func (o *OtelInputLog) GetActionOk() (*OtelInputConditionAction, bool)` +`func (o *OtelInputLog) GetActionOk() (*string, bool)` GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAction -`func (o *OtelInputLog) SetAction(v OtelInputConditionAction)` +`func (o *OtelInputLog) SetAction(v string)` SetAction sets Action field to given value. diff --git a/generated/stackstate_api/docs/OtelInputMetric.md b/generated/stackstate_api/docs/OtelInputMetric.md index a1f4afd0..ee2fccc8 100644 --- a/generated/stackstate_api/docs/OtelInputMetric.md +++ b/generated/stackstate_api/docs/OtelInputMetric.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Condition** | Pointer to **string** | A Cel expression that must return a boolean | [optional] -**Action** | Pointer to [**OtelInputConditionAction**](OtelInputConditionAction.md) | | [optional] +**Action** | Pointer to **string** | An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` | [optional] **Datapoint** | Pointer to [**OtelInputDatapoint**](OtelInputDatapoint.md) | | [optional] ## Methods @@ -54,20 +54,20 @@ HasCondition returns a boolean if a field has been set. ### GetAction -`func (o *OtelInputMetric) GetAction() OtelInputConditionAction` +`func (o *OtelInputMetric) GetAction() string` GetAction returns the Action field if non-nil, zero value otherwise. ### GetActionOk -`func (o *OtelInputMetric) GetActionOk() (*OtelInputConditionAction, bool)` +`func (o *OtelInputMetric) GetActionOk() (*string, bool)` GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAction -`func (o *OtelInputMetric) SetAction(v OtelInputConditionAction)` +`func (o *OtelInputMetric) SetAction(v string)` SetAction sets Action field to given value. diff --git a/generated/stackstate_api/docs/OtelInputResource.md b/generated/stackstate_api/docs/OtelInputResource.md index 4d619c9c..913aed00 100644 --- a/generated/stackstate_api/docs/OtelInputResource.md +++ b/generated/stackstate_api/docs/OtelInputResource.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Condition** | Pointer to **string** | A Cel expression that must return a boolean | [optional] -**Action** | Pointer to [**OtelInputConditionAction**](OtelInputConditionAction.md) | | [optional] +**Action** | Pointer to **string** | An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` | [optional] **Scope** | Pointer to [**OtelInputScope**](OtelInputScope.md) | | [optional] ## Methods @@ -54,20 +54,20 @@ HasCondition returns a boolean if a field has been set. ### GetAction -`func (o *OtelInputResource) GetAction() OtelInputConditionAction` +`func (o *OtelInputResource) GetAction() string` GetAction returns the Action field if non-nil, zero value otherwise. ### GetActionOk -`func (o *OtelInputResource) GetActionOk() (*OtelInputConditionAction, bool)` +`func (o *OtelInputResource) GetActionOk() (*string, bool)` GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAction -`func (o *OtelInputResource) SetAction(v OtelInputConditionAction)` +`func (o *OtelInputResource) SetAction(v string)` SetAction sets Action field to given value. diff --git a/generated/stackstate_api/docs/OtelInputScope.md b/generated/stackstate_api/docs/OtelInputScope.md index 464b9630..e83fe269 100644 --- a/generated/stackstate_api/docs/OtelInputScope.md +++ b/generated/stackstate_api/docs/OtelInputScope.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Condition** | Pointer to **string** | A Cel expression that must return a boolean | [optional] -**Action** | Pointer to [**OtelInputConditionAction**](OtelInputConditionAction.md) | | [optional] +**Action** | Pointer to **string** | An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` | [optional] **Metric** | Pointer to [**OtelInputMetric**](OtelInputMetric.md) | | [optional] **Span** | Pointer to [**OtelInputSpan**](OtelInputSpan.md) | | [optional] **Log** | Pointer to [**OtelInputLog**](OtelInputLog.md) | | [optional] @@ -56,20 +56,20 @@ HasCondition returns a boolean if a field has been set. ### GetAction -`func (o *OtelInputScope) GetAction() OtelInputConditionAction` +`func (o *OtelInputScope) GetAction() string` GetAction returns the Action field if non-nil, zero value otherwise. ### GetActionOk -`func (o *OtelInputScope) GetActionOk() (*OtelInputConditionAction, bool)` +`func (o *OtelInputScope) GetActionOk() (*string, bool)` GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAction -`func (o *OtelInputScope) SetAction(v OtelInputConditionAction)` +`func (o *OtelInputScope) SetAction(v string)` SetAction sets Action field to given value. diff --git a/generated/stackstate_api/docs/OtelInputSpan.md b/generated/stackstate_api/docs/OtelInputSpan.md index 617c5ec9..6ca073f0 100644 --- a/generated/stackstate_api/docs/OtelInputSpan.md +++ b/generated/stackstate_api/docs/OtelInputSpan.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Condition** | Pointer to **string** | A Cel expression that must return a boolean | [optional] -**Action** | Pointer to [**OtelInputConditionAction**](OtelInputConditionAction.md) | | [optional] +**Action** | Pointer to **string** | An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` | [optional] ## Methods @@ -53,20 +53,20 @@ HasCondition returns a boolean if a field has been set. ### GetAction -`func (o *OtelInputSpan) GetAction() OtelInputConditionAction` +`func (o *OtelInputSpan) GetAction() string` GetAction returns the Action field if non-nil, zero value otherwise. ### GetActionOk -`func (o *OtelInputSpan) GetActionOk() (*OtelInputConditionAction, bool)` +`func (o *OtelInputSpan) GetActionOk() (*string, bool)` GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAction -`func (o *OtelInputSpan) SetAction(v OtelInputConditionAction)` +`func (o *OtelInputSpan) SetAction(v string)` SetAction sets Action field to given value. diff --git a/generated/stackstate_api/model_otel_input_condition_action.go b/generated/stackstate_api/model_otel_input_condition_action.go deleted file mode 100644 index 1d510fc2..00000000 --- a/generated/stackstate_api/model_otel_input_condition_action.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "encoding/json" - "fmt" -) - -// OtelInputConditionAction the model 'OtelInputConditionAction' -type OtelInputConditionAction string - -// List of OtelInputConditionAction -const ( - OTELINPUTCONDITIONACTION_CREATE OtelInputConditionAction = "CREATE" - OTELINPUTCONDITIONACTION_CONTINUE OtelInputConditionAction = "CONTINUE" -) - -// All allowed values of OtelInputConditionAction enum -var AllowedOtelInputConditionActionEnumValues = []OtelInputConditionAction{ - "CREATE", - "CONTINUE", -} - -func (v *OtelInputConditionAction) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := OtelInputConditionAction(value) - for _, existing := range AllowedOtelInputConditionActionEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid OtelInputConditionAction", value) -} - -// NewOtelInputConditionActionFromValue returns a pointer to a valid OtelInputConditionAction -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewOtelInputConditionActionFromValue(v string) (*OtelInputConditionAction, error) { - ev := OtelInputConditionAction(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for OtelInputConditionAction: valid values are %v", v, AllowedOtelInputConditionActionEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v OtelInputConditionAction) IsValid() bool { - for _, existing := range AllowedOtelInputConditionActionEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to OtelInputConditionAction value -func (v OtelInputConditionAction) Ptr() *OtelInputConditionAction { - return &v -} - -type NullableOtelInputConditionAction struct { - value *OtelInputConditionAction - isSet bool -} - -func (v NullableOtelInputConditionAction) Get() *OtelInputConditionAction { - return v.value -} - -func (v *NullableOtelInputConditionAction) Set(val *OtelInputConditionAction) { - v.value = val - v.isSet = true -} - -func (v NullableOtelInputConditionAction) IsSet() bool { - return v.isSet -} - -func (v *NullableOtelInputConditionAction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOtelInputConditionAction(val *OtelInputConditionAction) *NullableOtelInputConditionAction { - return &NullableOtelInputConditionAction{value: val, isSet: true} -} - -func (v NullableOtelInputConditionAction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOtelInputConditionAction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_otel_input_datapoint.go b/generated/stackstate_api/model_otel_input_datapoint.go index cdbdf8a5..938970f4 100644 --- a/generated/stackstate_api/model_otel_input_datapoint.go +++ b/generated/stackstate_api/model_otel_input_datapoint.go @@ -18,8 +18,9 @@ import ( // OtelInputDatapoint Defines conditional mapping at the resource -> scope -> metric -> datapoint level. If omitted, `condition` defaults to `true` and `action` defaults to `CONTINUE`. type OtelInputDatapoint struct { // A Cel expression that must return a boolean - Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` - Action *OtelInputConditionAction `json:"action,omitempty" yaml:"action,omitempty"` + Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` + // An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` + Action *string `json:"action,omitempty" yaml:"action,omitempty"` } // NewOtelInputDatapoint instantiates a new OtelInputDatapoint object @@ -72,9 +73,9 @@ func (o *OtelInputDatapoint) SetCondition(v string) { } // GetAction returns the Action field value if set, zero value otherwise. -func (o *OtelInputDatapoint) GetAction() OtelInputConditionAction { +func (o *OtelInputDatapoint) GetAction() string { if o == nil || o.Action == nil { - var ret OtelInputConditionAction + var ret string return ret } return *o.Action @@ -82,7 +83,7 @@ func (o *OtelInputDatapoint) GetAction() OtelInputConditionAction { // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OtelInputDatapoint) GetActionOk() (*OtelInputConditionAction, bool) { +func (o *OtelInputDatapoint) GetActionOk() (*string, bool) { if o == nil || o.Action == nil { return nil, false } @@ -98,8 +99,8 @@ func (o *OtelInputDatapoint) HasAction() bool { return false } -// SetAction gets a reference to the given OtelInputConditionAction and assigns it to the Action field. -func (o *OtelInputDatapoint) SetAction(v OtelInputConditionAction) { +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *OtelInputDatapoint) SetAction(v string) { o.Action = &v } diff --git a/generated/stackstate_api/model_otel_input_log.go b/generated/stackstate_api/model_otel_input_log.go index a856e848..907482c2 100644 --- a/generated/stackstate_api/model_otel_input_log.go +++ b/generated/stackstate_api/model_otel_input_log.go @@ -18,8 +18,9 @@ import ( // OtelInputLog Defines conditional mapping at the resource -> scope -> log level. If omitted, `condition` defaults to `true` and `action` defaults to `CONTINUE`. type OtelInputLog struct { // A Cel expression that must return a boolean - Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` - Action *OtelInputConditionAction `json:"action,omitempty" yaml:"action,omitempty"` + Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` + // An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` + Action *string `json:"action,omitempty" yaml:"action,omitempty"` } // NewOtelInputLog instantiates a new OtelInputLog object @@ -72,9 +73,9 @@ func (o *OtelInputLog) SetCondition(v string) { } // GetAction returns the Action field value if set, zero value otherwise. -func (o *OtelInputLog) GetAction() OtelInputConditionAction { +func (o *OtelInputLog) GetAction() string { if o == nil || o.Action == nil { - var ret OtelInputConditionAction + var ret string return ret } return *o.Action @@ -82,7 +83,7 @@ func (o *OtelInputLog) GetAction() OtelInputConditionAction { // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OtelInputLog) GetActionOk() (*OtelInputConditionAction, bool) { +func (o *OtelInputLog) GetActionOk() (*string, bool) { if o == nil || o.Action == nil { return nil, false } @@ -98,8 +99,8 @@ func (o *OtelInputLog) HasAction() bool { return false } -// SetAction gets a reference to the given OtelInputConditionAction and assigns it to the Action field. -func (o *OtelInputLog) SetAction(v OtelInputConditionAction) { +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *OtelInputLog) SetAction(v string) { o.Action = &v } diff --git a/generated/stackstate_api/model_otel_input_metric.go b/generated/stackstate_api/model_otel_input_metric.go index efc939ca..abe6a495 100644 --- a/generated/stackstate_api/model_otel_input_metric.go +++ b/generated/stackstate_api/model_otel_input_metric.go @@ -18,9 +18,10 @@ import ( // OtelInputMetric Defines conditional mapping at the resource -> scope -> metric level. If omitted, `condition` defaults to `true` and `action` defaults to `CONTINUE`. type OtelInputMetric struct { // A Cel expression that must return a boolean - Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` - Action *OtelInputConditionAction `json:"action,omitempty" yaml:"action,omitempty"` - Datapoint *OtelInputDatapoint `json:"datapoint,omitempty" yaml:"datapoint,omitempty"` + Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` + // An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` + Action *string `json:"action,omitempty" yaml:"action,omitempty"` + Datapoint *OtelInputDatapoint `json:"datapoint,omitempty" yaml:"datapoint,omitempty"` } // NewOtelInputMetric instantiates a new OtelInputMetric object @@ -73,9 +74,9 @@ func (o *OtelInputMetric) SetCondition(v string) { } // GetAction returns the Action field value if set, zero value otherwise. -func (o *OtelInputMetric) GetAction() OtelInputConditionAction { +func (o *OtelInputMetric) GetAction() string { if o == nil || o.Action == nil { - var ret OtelInputConditionAction + var ret string return ret } return *o.Action @@ -83,7 +84,7 @@ func (o *OtelInputMetric) GetAction() OtelInputConditionAction { // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OtelInputMetric) GetActionOk() (*OtelInputConditionAction, bool) { +func (o *OtelInputMetric) GetActionOk() (*string, bool) { if o == nil || o.Action == nil { return nil, false } @@ -99,8 +100,8 @@ func (o *OtelInputMetric) HasAction() bool { return false } -// SetAction gets a reference to the given OtelInputConditionAction and assigns it to the Action field. -func (o *OtelInputMetric) SetAction(v OtelInputConditionAction) { +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *OtelInputMetric) SetAction(v string) { o.Action = &v } diff --git a/generated/stackstate_api/model_otel_input_resource.go b/generated/stackstate_api/model_otel_input_resource.go index e6247d7a..e86b4fcb 100644 --- a/generated/stackstate_api/model_otel_input_resource.go +++ b/generated/stackstate_api/model_otel_input_resource.go @@ -18,9 +18,10 @@ import ( // OtelInputResource Defines the conditional mapping at the resource level. If omitted, `condition` defaults to `true` and `action` defaults to `CONTINUE`. type OtelInputResource struct { // A Cel expression that must return a boolean - Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` - Action *OtelInputConditionAction `json:"action,omitempty" yaml:"action,omitempty"` - Scope *OtelInputScope `json:"scope,omitempty" yaml:"scope,omitempty"` + Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` + // An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` + Action *string `json:"action,omitempty" yaml:"action,omitempty"` + Scope *OtelInputScope `json:"scope,omitempty" yaml:"scope,omitempty"` } // NewOtelInputResource instantiates a new OtelInputResource object @@ -73,9 +74,9 @@ func (o *OtelInputResource) SetCondition(v string) { } // GetAction returns the Action field value if set, zero value otherwise. -func (o *OtelInputResource) GetAction() OtelInputConditionAction { +func (o *OtelInputResource) GetAction() string { if o == nil || o.Action == nil { - var ret OtelInputConditionAction + var ret string return ret } return *o.Action @@ -83,7 +84,7 @@ func (o *OtelInputResource) GetAction() OtelInputConditionAction { // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OtelInputResource) GetActionOk() (*OtelInputConditionAction, bool) { +func (o *OtelInputResource) GetActionOk() (*string, bool) { if o == nil || o.Action == nil { return nil, false } @@ -99,8 +100,8 @@ func (o *OtelInputResource) HasAction() bool { return false } -// SetAction gets a reference to the given OtelInputConditionAction and assigns it to the Action field. -func (o *OtelInputResource) SetAction(v OtelInputConditionAction) { +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *OtelInputResource) SetAction(v string) { o.Action = &v } diff --git a/generated/stackstate_api/model_otel_input_scope.go b/generated/stackstate_api/model_otel_input_scope.go index ba9e4951..e1ee2c62 100644 --- a/generated/stackstate_api/model_otel_input_scope.go +++ b/generated/stackstate_api/model_otel_input_scope.go @@ -18,11 +18,12 @@ import ( // OtelInputScope Defines conditional mapping at the resource -> scope level. If omitted, `condition` defaults to `true` and `action` defaults to `CONTINUE`. type OtelInputScope struct { // A Cel expression that must return a boolean - Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` - Action *OtelInputConditionAction `json:"action,omitempty" yaml:"action,omitempty"` - Metric *OtelInputMetric `json:"metric,omitempty" yaml:"metric,omitempty"` - Span *OtelInputSpan `json:"span,omitempty" yaml:"span,omitempty"` - Log *OtelInputLog `json:"log,omitempty" yaml:"log,omitempty"` + Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` + // An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` + Action *string `json:"action,omitempty" yaml:"action,omitempty"` + Metric *OtelInputMetric `json:"metric,omitempty" yaml:"metric,omitempty"` + Span *OtelInputSpan `json:"span,omitempty" yaml:"span,omitempty"` + Log *OtelInputLog `json:"log,omitempty" yaml:"log,omitempty"` } // NewOtelInputScope instantiates a new OtelInputScope object @@ -75,9 +76,9 @@ func (o *OtelInputScope) SetCondition(v string) { } // GetAction returns the Action field value if set, zero value otherwise. -func (o *OtelInputScope) GetAction() OtelInputConditionAction { +func (o *OtelInputScope) GetAction() string { if o == nil || o.Action == nil { - var ret OtelInputConditionAction + var ret string return ret } return *o.Action @@ -85,7 +86,7 @@ func (o *OtelInputScope) GetAction() OtelInputConditionAction { // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OtelInputScope) GetActionOk() (*OtelInputConditionAction, bool) { +func (o *OtelInputScope) GetActionOk() (*string, bool) { if o == nil || o.Action == nil { return nil, false } @@ -101,8 +102,8 @@ func (o *OtelInputScope) HasAction() bool { return false } -// SetAction gets a reference to the given OtelInputConditionAction and assigns it to the Action field. -func (o *OtelInputScope) SetAction(v OtelInputConditionAction) { +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *OtelInputScope) SetAction(v string) { o.Action = &v } diff --git a/generated/stackstate_api/model_otel_input_span.go b/generated/stackstate_api/model_otel_input_span.go index 315a3cfe..21b8e8bc 100644 --- a/generated/stackstate_api/model_otel_input_span.go +++ b/generated/stackstate_api/model_otel_input_span.go @@ -18,8 +18,9 @@ import ( // OtelInputSpan Defines conditional mapping at the resource -> scope -> span level. If omitted, `condition` defaults to `true` and `action` defaults to `CONTINUE`. type OtelInputSpan struct { // A Cel expression that must return a boolean - Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` - Action *OtelInputConditionAction `json:"action,omitempty" yaml:"action,omitempty"` + Condition *string `json:"condition,omitempty" yaml:"condition,omitempty"` + // An expression that must produce a string. It must be one of these formats: - A plain string, for example `\"this is a plain string\"` - A cel expression that must return a string, for example: `resource.attributes['service.namespace']` + Action *string `json:"action,omitempty" yaml:"action,omitempty"` } // NewOtelInputSpan instantiates a new OtelInputSpan object @@ -72,9 +73,9 @@ func (o *OtelInputSpan) SetCondition(v string) { } // GetAction returns the Action field value if set, zero value otherwise. -func (o *OtelInputSpan) GetAction() OtelInputConditionAction { +func (o *OtelInputSpan) GetAction() string { if o == nil || o.Action == nil { - var ret OtelInputConditionAction + var ret string return ret } return *o.Action @@ -82,7 +83,7 @@ func (o *OtelInputSpan) GetAction() OtelInputConditionAction { // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OtelInputSpan) GetActionOk() (*OtelInputConditionAction, bool) { +func (o *OtelInputSpan) GetActionOk() (*string, bool) { if o == nil || o.Action == nil { return nil, false } @@ -98,8 +99,8 @@ func (o *OtelInputSpan) HasAction() bool { return false } -// SetAction gets a reference to the given OtelInputConditionAction and assigns it to the Action field. -func (o *OtelInputSpan) SetAction(v OtelInputConditionAction) { +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *OtelInputSpan) SetAction(v string) { o.Action = &v } From 900eec042ffd7571fa9235c9fdf0e2aec21bd533 Mon Sep 17 00:00:00 2001 From: Deon Taljaard Date: Tue, 5 May 2026 12:18:09 +0200 Subject: [PATCH 2/2] STAC-24562: bump openapi version --- generated/stackstate_api/client.go | 2 +- stackstate_openapi/openapi_version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generated/stackstate_api/client.go b/generated/stackstate_api/client.go index 62a231c2..2c4b740d 100644 --- a/generated/stackstate_api/client.go +++ b/generated/stackstate_api/client.go @@ -524,7 +524,7 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err } return nil } - return errors.New(fmt.Sprintf("fatal: could not unmarshal content type: '%s' into '%T'", contentType, v)) + return errors.New("undefined response type") } // Add a file to the multipart request diff --git a/stackstate_openapi/openapi_version b/stackstate_openapi/openapi_version index ba729f19..8ffdade9 100644 --- a/stackstate_openapi/openapi_version +++ b/stackstate_openapi/openapi_version @@ -1 +1 @@ -f27d89a522919807c1bfc883f8aa43cc0e812516 \ No newline at end of file +e9e67639be1ffaa27d274d3d1902a6b5561772c7 \ No newline at end of file