Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-30 19:44:25.864590",
"spec_repo_commit": "909e369c"
"regenerated": "2024-09-30 20:17:13.780810",
"spec_repo_commit": "64b1c61a"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-30 19:44:25.879560",
"spec_repo_commit": "909e369c"
"regenerated": "2024-09-30 20:17:13.795369",
"spec_repo_commit": "64b1c61a"
}
}
}
1 change: 0 additions & 1 deletion .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17286,7 +17286,6 @@ components:
$ref: '#/components/schemas/ToplistWidgetStackedType'
required:
- type
- legend
type: object
ToplistWidgetStackedType:
default: stacked
Expand Down
44 changes: 0 additions & 44 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19089,25 +19089,6 @@ components:
meta:
$ref: '#/components/schemas/ResponseMetaAttributes'
type: object
SecurityMonitoringReferenceTable:
description: Reference table for the rule.
properties:
checkPresence:
description: Whether to include or exclude the matched values.
type: boolean
columnName:
description: The name of the column in the reference table.
type: string
logFieldPath:
description: The field in the log to match against the reference table.
type: string
ruleQueryName:
description: The name of the rule query to apply the reference table to.
type: string
tableName:
description: The name of the reference table.
type: string
type: object
SecurityMonitoringRuleCase:
description: Case when signal is generated.
properties:
Expand Down Expand Up @@ -19613,11 +19594,6 @@ components:
items:
$ref: '#/components/schemas/SecurityMonitoringRuleQuery'
type: array
referenceTables:
description: Reference tables for the rule.
items:
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
type: array
tags:
description: Tags for generated signals.
items:
Expand Down Expand Up @@ -20322,11 +20298,6 @@ components:
items:
$ref: '#/components/schemas/SecurityMonitoringStandardRuleQuery'
type: array
referenceTables:
description: Reference tables for the rule.
items:
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
type: array
tags:
description: Tags for generated signals.
example:
Expand Down Expand Up @@ -20394,11 +20365,6 @@ components:
items:
$ref: '#/components/schemas/SecurityMonitoringStandardRuleQuery'
type: array
referenceTables:
description: Reference tables for the rule.
items:
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
type: array
tags:
description: Tags for generated signals.
example:
Expand Down Expand Up @@ -20539,11 +20505,6 @@ components:
items:
$ref: '#/components/schemas/SecurityMonitoringStandardRuleQuery'
type: array
referenceTables:
description: Reference tables for the rule.
items:
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
type: array
tags:
description: Tags for generated signals.
items:
Expand Down Expand Up @@ -20608,11 +20569,6 @@ components:
items:
$ref: '#/components/schemas/SecurityMonitoringStandardRuleQuery'
type: array
referenceTables:
description: Reference tables for the rule.
items:
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
type: array
tags:
description: Tags for generated signals.
example:
Expand Down
39 changes: 21 additions & 18 deletions api/datadogV1/model_toplist_widget_stacked.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// ToplistWidgetStacked Top list widget stacked display options.
type ToplistWidgetStacked struct {
// Top list widget stacked legend behavior.
Legend ToplistWidgetLegend `json:"legend"`
Legend *ToplistWidgetLegend `json:"legend,omitempty"`
// Top list widget stacked display type.
Type ToplistWidgetStackedType `json:"type"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
Expand All @@ -25,9 +25,8 @@ type ToplistWidgetStacked struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed.
func NewToplistWidgetStacked(legend ToplistWidgetLegend, typeVar ToplistWidgetStackedType) *ToplistWidgetStacked {
func NewToplistWidgetStacked(typeVar ToplistWidgetStackedType) *ToplistWidgetStacked {
this := ToplistWidgetStacked{}
this.Legend = legend
this.Type = typeVar
return &this
}
Expand All @@ -42,27 +41,32 @@ func NewToplistWidgetStackedWithDefaults() *ToplistWidgetStacked {
return &this
}

// GetLegend returns the Legend field value.
// GetLegend returns the Legend field value if set, zero value otherwise.
func (o *ToplistWidgetStacked) GetLegend() ToplistWidgetLegend {
if o == nil {
if o == nil || o.Legend == nil {
var ret ToplistWidgetLegend
return ret
}
return o.Legend
return *o.Legend
}

// GetLegendOk returns a tuple with the Legend field value
// GetLegendOk returns a tuple with the Legend field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToplistWidgetStacked) GetLegendOk() (*ToplistWidgetLegend, bool) {
if o == nil {
if o == nil || o.Legend == nil {
return nil, false
}
return &o.Legend, true
return o.Legend, true
}

// HasLegend returns a boolean if a field has been set.
func (o *ToplistWidgetStacked) HasLegend() bool {
return o != nil && o.Legend != nil
}

// SetLegend sets field value.
// SetLegend gets a reference to the given ToplistWidgetLegend and assigns it to the Legend field.
func (o *ToplistWidgetStacked) SetLegend(v ToplistWidgetLegend) {
o.Legend = v
o.Legend = &v
}

// GetType returns the Type field value.
Expand Down Expand Up @@ -94,7 +98,9 @@ func (o ToplistWidgetStacked) MarshalJSON() ([]byte, error) {
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
toSerialize["legend"] = o.Legend
if o.Legend != nil {
toSerialize["legend"] = o.Legend
}
toSerialize["type"] = o.Type

for key, value := range o.AdditionalProperties {
Expand All @@ -106,15 +112,12 @@ func (o ToplistWidgetStacked) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *ToplistWidgetStacked) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Legend *ToplistWidgetLegend `json:"legend"`
Legend *ToplistWidgetLegend `json:"legend,omitempty"`
Type *ToplistWidgetStackedType `json:"type"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
if all.Legend == nil {
return fmt.Errorf("required field legend missing")
}
if all.Type == nil {
return fmt.Errorf("required field type missing")
}
Expand All @@ -126,10 +129,10 @@ func (o *ToplistWidgetStacked) UnmarshalJSON(bytes []byte) (err error) {
}

hasInvalidField := false
if !all.Legend.IsValid() {
if all.Legend != nil && !all.Legend.IsValid() {
hasInvalidField = true
} else {
o.Legend = *all.Legend
o.Legend = all.Legend
}
if !all.Type.IsValid() {
hasInvalidField = true
Expand Down
Loading