Skip to content

Commit

Permalink
Regenerate client from commit 57b75ade of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Aug 17, 2022
1 parent 72dd5a6 commit 78e620b
Show file tree
Hide file tree
Showing 33 changed files with 506 additions and 130 deletions.
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.2",
"regenerated": "2022-08-17 14:32:18.570797",
"spec_repo_commit": "a957cd49"
"regenerated": "2022-08-17 17:26:25.758230",
"spec_repo_commit": "57b75ade"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-08-17 14:32:18.586483",
"spec_repo_commit": "a957cd49"
"regenerated": "2022-08-17 17:26:25.770716",
"spec_repo_commit": "57b75ade"
}
}
}
39 changes: 39 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6133,6 +6133,17 @@ components:
format: int64
nullable: true
type: integer
group_retention_duration:
description: 'The time span after which groups with missing data are dropped
from the monitor state.

The minimum value is one hour, and the maximum value is 72 hours.

Example values are: "60m", "1h", and "2d".

This option is only available for APM Trace Analytics, Audit Trail, CI,
Error Tracking, Event, Logs, and RUM monitors.'
type: string
groupby_simple_monitor:
description: Whether the log alert monitor triggers a single alert or multiple
alerts when any group breaches a threshold.
Expand Down Expand Up @@ -6223,6 +6234,8 @@ components:
description: A Boolean indicating whether this monitor notifies when data
stops reporting.
type: boolean
on_missing_data:
$ref: '#/components/schemas/OnMissingDataOption'
renotify_interval:
default: null
description: "The number of minutes after the last notification before a
Expand Down Expand Up @@ -7928,6 +7941,32 @@ components:
format: int64
type: integer
type: object
OnMissingDataOption:
description: 'Controls how groups or monitors are treated if an evaluation does
not return any data points.

The default option results in different behavior depending on the monitor
query type.

For monitors using Count queries, an empty monitor evaluation is treated as
0 and is compared to the threshold conditions.

For monitor using any query type other than Count, for example Gauge or Rate,
the monitor shows the last known status.

This option is only available for APM Trace Analytics, Audit Trail, CI, Error
Tracking, Event, Logs, and RUM monitors.'
enum:
- default
- show_no_data
- show_and_notify_no_data
- resolve
type: string
x-enum-varnames:
- DEFAULT
- SHOW_NO_DATA
- SHOW_AND_NOTIFY_NO_DATA
- RESOLVE
OrgDowngradedResponse:
description: Status of downgrade
properties:
Expand Down
143 changes: 118 additions & 25 deletions api/datadogV1/model_monitor_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ type MonitorOptions struct {
// the timeframe is set to `last_5m` and the time is 7:00, the monitor evaluates data from 6:50 to 6:55.
// This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor always has data during evaluation.
EvaluationDelay datadog.NullableInt64 `json:"evaluation_delay,omitempty"`
// The time span after which groups with missing data are dropped from the monitor state.
// The minimum value is one hour, and the maximum value is 72 hours.
// Example values are: "60m", "1h", and "2d".
// This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.
GroupRetentionDuration *string `json:"group_retention_duration,omitempty"`
// Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold.
GroupbySimpleMonitor *bool `json:"groupby_simple_monitor,omitempty"`
// A Boolean indicating whether notifications from this monitor automatically inserts its triggering tags into the title.
Expand Down Expand Up @@ -66,6 +71,12 @@ type MonitorOptions struct {
NotifyAudit *bool `json:"notify_audit,omitempty"`
// A Boolean indicating whether this monitor notifies when data stops reporting.
NotifyNoData *bool `json:"notify_no_data,omitempty"`
// Controls how groups or monitors are treated if an evaluation does not return any data points.
// The default option results in different behavior depending on the monitor query type.
// For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions.
// For monitor using any query type other than Count, for example Gauge or Rate, the monitor shows the last known status.
// This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.
OnMissingData *OnMissingDataOption `json:"on_missing_data,omitempty"`
// The number of minutes after the last notification before a monitor re-notifies on the current status.
// It only re-notifies if it’s not resolved.
RenotifyInterval datadog.NullableInt64 `json:"renotify_interval,omitempty"`
Expand Down Expand Up @@ -319,6 +330,38 @@ func (o *MonitorOptions) UnsetEvaluationDelay() {
o.EvaluationDelay.Unset()
}

// GetGroupRetentionDuration returns the GroupRetentionDuration field value if set, zero value otherwise.
func (o *MonitorOptions) GetGroupRetentionDuration() string {
if o == nil || o.GroupRetentionDuration == nil {
var ret string
return ret
}
return *o.GroupRetentionDuration
}

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

// HasGroupRetentionDuration returns a boolean if a field has been set.
func (o *MonitorOptions) HasGroupRetentionDuration() bool {
if o != nil && o.GroupRetentionDuration != nil {
return true
}

return false
}

// SetGroupRetentionDuration gets a reference to the given string and assigns it to the GroupRetentionDuration field.
func (o *MonitorOptions) SetGroupRetentionDuration(v string) {
o.GroupRetentionDuration = &v
}

// GetGroupbySimpleMonitor returns the GroupbySimpleMonitor field value if set, zero value otherwise.
func (o *MonitorOptions) GetGroupbySimpleMonitor() bool {
if o == nil || o.GroupbySimpleMonitor == nil {
Expand Down Expand Up @@ -700,6 +743,38 @@ func (o *MonitorOptions) SetNotifyNoData(v bool) {
o.NotifyNoData = &v
}

// GetOnMissingData returns the OnMissingData field value if set, zero value otherwise.
func (o *MonitorOptions) GetOnMissingData() OnMissingDataOption {
if o == nil || o.OnMissingData == nil {
var ret OnMissingDataOption
return ret
}
return *o.OnMissingData
}

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

// HasOnMissingData returns a boolean if a field has been set.
func (o *MonitorOptions) HasOnMissingData() bool {
if o != nil && o.OnMissingData != nil {
return true
}

return false
}

// SetOnMissingData gets a reference to the given OnMissingDataOption and assigns it to the OnMissingData field.
func (o *MonitorOptions) SetOnMissingData(v OnMissingDataOption) {
o.OnMissingData = &v
}

// GetRenotifyInterval returns the RenotifyInterval field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MonitorOptions) GetRenotifyInterval() int64 {
if o == nil || o.RenotifyInterval.Get() == nil {
Expand Down Expand Up @@ -1092,6 +1167,9 @@ func (o MonitorOptions) MarshalJSON() ([]byte, error) {
if o.EvaluationDelay.IsSet() {
toSerialize["evaluation_delay"] = o.EvaluationDelay.Get()
}
if o.GroupRetentionDuration != nil {
toSerialize["group_retention_duration"] = o.GroupRetentionDuration
}
if o.GroupbySimpleMonitor != nil {
toSerialize["groupby_simple_monitor"] = o.GroupbySimpleMonitor
}
Expand Down Expand Up @@ -1122,6 +1200,9 @@ func (o MonitorOptions) MarshalJSON() ([]byte, error) {
if o.NotifyNoData != nil {
toSerialize["notify_no_data"] = o.NotifyNoData
}
if o.OnMissingData != nil {
toSerialize["on_missing_data"] = o.OnMissingData
}
if o.RenotifyInterval.IsSet() {
toSerialize["renotify_interval"] = o.RenotifyInterval.Get()
}
Expand Down Expand Up @@ -1163,31 +1244,33 @@ func (o MonitorOptions) MarshalJSON() ([]byte, error) {
func (o *MonitorOptions) UnmarshalJSON(bytes []byte) (err error) {
raw := map[string]interface{}{}
all := struct {
Aggregation *MonitorOptionsAggregation `json:"aggregation,omitempty"`
DeviceIds []MonitorDeviceID `json:"device_ids,omitempty"`
EnableLogsSample *bool `json:"enable_logs_sample,omitempty"`
EscalationMessage *string `json:"escalation_message,omitempty"`
EvaluationDelay datadog.NullableInt64 `json:"evaluation_delay,omitempty"`
GroupbySimpleMonitor *bool `json:"groupby_simple_monitor,omitempty"`
IncludeTags *bool `json:"include_tags,omitempty"`
Locked *bool `json:"locked,omitempty"`
MinFailureDuration datadog.NullableInt64 `json:"min_failure_duration,omitempty"`
MinLocationFailed datadog.NullableInt64 `json:"min_location_failed,omitempty"`
NewGroupDelay datadog.NullableInt64 `json:"new_group_delay,omitempty"`
NewHostDelay datadog.NullableInt64 `json:"new_host_delay,omitempty"`
NoDataTimeframe datadog.NullableInt64 `json:"no_data_timeframe,omitempty"`
NotifyAudit *bool `json:"notify_audit,omitempty"`
NotifyNoData *bool `json:"notify_no_data,omitempty"`
RenotifyInterval datadog.NullableInt64 `json:"renotify_interval,omitempty"`
RenotifyOccurrences datadog.NullableInt64 `json:"renotify_occurrences,omitempty"`
RenotifyStatuses []MonitorRenotifyStatusType `json:"renotify_statuses,omitempty"`
RequireFullWindow *bool `json:"require_full_window,omitempty"`
Silenced map[string]int64 `json:"silenced,omitempty"`
SyntheticsCheckId datadog.NullableString `json:"synthetics_check_id,omitempty"`
ThresholdWindows *MonitorThresholdWindowOptions `json:"threshold_windows,omitempty"`
Thresholds *MonitorThresholds `json:"thresholds,omitempty"`
TimeoutH datadog.NullableInt64 `json:"timeout_h,omitempty"`
Variables []MonitorFormulaAndFunctionQueryDefinition `json:"variables,omitempty"`
Aggregation *MonitorOptionsAggregation `json:"aggregation,omitempty"`
DeviceIds []MonitorDeviceID `json:"device_ids,omitempty"`
EnableLogsSample *bool `json:"enable_logs_sample,omitempty"`
EscalationMessage *string `json:"escalation_message,omitempty"`
EvaluationDelay datadog.NullableInt64 `json:"evaluation_delay,omitempty"`
GroupRetentionDuration *string `json:"group_retention_duration,omitempty"`
GroupbySimpleMonitor *bool `json:"groupby_simple_monitor,omitempty"`
IncludeTags *bool `json:"include_tags,omitempty"`
Locked *bool `json:"locked,omitempty"`
MinFailureDuration datadog.NullableInt64 `json:"min_failure_duration,omitempty"`
MinLocationFailed datadog.NullableInt64 `json:"min_location_failed,omitempty"`
NewGroupDelay datadog.NullableInt64 `json:"new_group_delay,omitempty"`
NewHostDelay datadog.NullableInt64 `json:"new_host_delay,omitempty"`
NoDataTimeframe datadog.NullableInt64 `json:"no_data_timeframe,omitempty"`
NotifyAudit *bool `json:"notify_audit,omitempty"`
NotifyNoData *bool `json:"notify_no_data,omitempty"`
OnMissingData *OnMissingDataOption `json:"on_missing_data,omitempty"`
RenotifyInterval datadog.NullableInt64 `json:"renotify_interval,omitempty"`
RenotifyOccurrences datadog.NullableInt64 `json:"renotify_occurrences,omitempty"`
RenotifyStatuses []MonitorRenotifyStatusType `json:"renotify_statuses,omitempty"`
RequireFullWindow *bool `json:"require_full_window,omitempty"`
Silenced map[string]int64 `json:"silenced,omitempty"`
SyntheticsCheckId datadog.NullableString `json:"synthetics_check_id,omitempty"`
ThresholdWindows *MonitorThresholdWindowOptions `json:"threshold_windows,omitempty"`
Thresholds *MonitorThresholds `json:"thresholds,omitempty"`
TimeoutH datadog.NullableInt64 `json:"timeout_h,omitempty"`
Variables []MonitorFormulaAndFunctionQueryDefinition `json:"variables,omitempty"`
}{}
err = json.Unmarshal(bytes, &all)
if err != nil {
Expand All @@ -1198,6 +1281,14 @@ func (o *MonitorOptions) UnmarshalJSON(bytes []byte) (err error) {
o.UnparsedObject = raw
return nil
}
if v := all.OnMissingData; v != nil && !v.IsValid() {
err = json.Unmarshal(bytes, &raw)
if err != nil {
return err
}
o.UnparsedObject = raw
return nil
}
if all.Aggregation != nil && all.Aggregation.UnparsedObject != nil && o.UnparsedObject == nil {
err = json.Unmarshal(bytes, &raw)
if err != nil {
Expand All @@ -1210,6 +1301,7 @@ func (o *MonitorOptions) UnmarshalJSON(bytes []byte) (err error) {
o.EnableLogsSample = all.EnableLogsSample
o.EscalationMessage = all.EscalationMessage
o.EvaluationDelay = all.EvaluationDelay
o.GroupRetentionDuration = all.GroupRetentionDuration
o.GroupbySimpleMonitor = all.GroupbySimpleMonitor
o.IncludeTags = all.IncludeTags
o.Locked = all.Locked
Expand All @@ -1220,6 +1312,7 @@ func (o *MonitorOptions) UnmarshalJSON(bytes []byte) (err error) {
o.NoDataTimeframe = all.NoDataTimeframe
o.NotifyAudit = all.NotifyAudit
o.NotifyNoData = all.NotifyNoData
o.OnMissingData = all.OnMissingData
o.RenotifyInterval = all.RenotifyInterval
o.RenotifyOccurrences = all.RenotifyOccurrences
o.RenotifyStatuses = all.RenotifyStatuses
Expand Down
Loading

0 comments on commit 78e620b

Please sign in to comment.