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
4 changes: 4 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,10 @@ components:
increase_good:
description: Whether to show increase as good.
type: boolean
limit:
description: The number of items to show.
format: int64
type: integer
log_query:
$ref: '#/components/schemas/LogQueryDefinition'
network_query:
Expand Down
37 changes: 36 additions & 1 deletion api/datadogV1/model_change_widget_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ type ChangeWidgetRequest struct {
Formulas []WidgetFormula `json:"formulas,omitempty"`
// Whether to show increase as good.
IncreaseGood *bool `json:"increase_good,omitempty"`
// The number of items to show.
Limit *int64 `json:"limit,omitempty"`
// The log query.
LogQuery *LogQueryDefinition `json:"log_query,omitempty"`
// The log query.
Expand Down Expand Up @@ -236,6 +238,34 @@ func (o *ChangeWidgetRequest) SetIncreaseGood(v bool) {
o.IncreaseGood = &v
}

// GetLimit returns the Limit field value if set, zero value otherwise.
func (o *ChangeWidgetRequest) GetLimit() int64 {
if o == nil || o.Limit == nil {
var ret int64
return ret
}
return *o.Limit
}

// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ChangeWidgetRequest) GetLimitOk() (*int64, bool) {
if o == nil || o.Limit == nil {
return nil, false
}
return o.Limit, true
}

// HasLimit returns a boolean if a field has been set.
func (o *ChangeWidgetRequest) HasLimit() bool {
return o != nil && o.Limit != nil
}

// SetLimit gets a reference to the given int64 and assigns it to the Limit field.
func (o *ChangeWidgetRequest) SetLimit(v int64) {
o.Limit = &v
}

// GetLogQuery returns the LogQuery field value if set, zero value otherwise.
func (o *ChangeWidgetRequest) GetLogQuery() LogQueryDefinition {
if o == nil || o.LogQuery == nil {
Expand Down Expand Up @@ -596,6 +626,9 @@ func (o ChangeWidgetRequest) MarshalJSON() ([]byte, error) {
if o.IncreaseGood != nil {
toSerialize["increase_good"] = o.IncreaseGood
}
if o.Limit != nil {
toSerialize["limit"] = o.Limit
}
if o.LogQuery != nil {
toSerialize["log_query"] = o.LogQuery
}
Expand Down Expand Up @@ -648,6 +681,7 @@ func (o *ChangeWidgetRequest) UnmarshalJSON(bytes []byte) (err error) {
EventQuery *LogQueryDefinition `json:"event_query,omitempty"`
Formulas []WidgetFormula `json:"formulas,omitempty"`
IncreaseGood *bool `json:"increase_good,omitempty"`
Limit *int64 `json:"limit,omitempty"`
LogQuery *LogQueryDefinition `json:"log_query,omitempty"`
NetworkQuery *LogQueryDefinition `json:"network_query,omitempty"`
OrderBy *WidgetOrderBy `json:"order_by,omitempty"`
Expand All @@ -666,7 +700,7 @@ func (o *ChangeWidgetRequest) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"apm_query", "change_type", "compare_to", "event_query", "formulas", "increase_good", "log_query", "network_query", "order_by", "order_dir", "process_query", "profile_metrics_query", "q", "queries", "response_format", "rum_query", "security_query", "show_present"})
datadog.DeleteKeys(additionalProperties, &[]string{"apm_query", "change_type", "compare_to", "event_query", "formulas", "increase_good", "limit", "log_query", "network_query", "order_by", "order_dir", "process_query", "profile_metrics_query", "q", "queries", "response_format", "rum_query", "security_query", "show_present"})
} else {
return err
}
Expand All @@ -692,6 +726,7 @@ func (o *ChangeWidgetRequest) UnmarshalJSON(bytes []byte) (err error) {
o.EventQuery = all.EventQuery
o.Formulas = all.Formulas
o.IncreaseGood = all.IncreaseGood
o.Limit = all.Limit
if all.LogQuery != nil && all.LogQuery.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
Expand Down