Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'unknown' monitor threshold field #139

Merged
merged 1 commit into from
Jan 16, 2018
Merged
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
31 changes: 31 additions & 0 deletions datadog-accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -10522,6 +10522,37 @@ func (t *ThresholdCount) SetOk(v json.Number) {
t.Ok = &v
}

// GetUnknown returns the Unknown field if non-nil, zero value otherwise.
func (t *ThresholdCount) GetUnknown() json.Number {
if t == nil || t.Unknown == nil {
return ""
}
return *t.Unknown
}

// GetOkUnknown returns a tuple with the Unknown field if it's non-nil, zero value otherwise
// and a boolean to check if the value has been set.
func (t *ThresholdCount) GetUnknownOk() (json.Number, bool) {
if t == nil || t.Unknown == nil {
return "", false
}
return *t.Unknown, true
}

// HasUnknown returns a boolean if a field has been set.
func (t *ThresholdCount) HasUnknown() bool {
if t != nil && t.Unknown != nil {
return true
}

return false
}

// SetUnknown allocates a new t.Unknown and returns the pointer to it.
func (t *ThresholdCount) SetUnknown(v json.Number) {
t.Unknown = &v
}

// GetWarning returns the Warning field if non-nil, zero value otherwise.
func (t *ThresholdCount) GetWarning() json.Number {
if t == nil || t.Warning == nil {
Expand Down
1 change: 1 addition & 0 deletions monitors.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type ThresholdCount struct {
Ok *json.Number `json:"ok,omitempty"`
Critical *json.Number `json:"critical,omitempty"`
Warning *json.Number `json:"warning,omitempty"`
Unknown *json.Number `json:"unknown,omitempty"`
CriticalRecovery *json.Number `json:"critical_recovery,omitempty"`
WarningRecovery *json.Number `json:"warning_recovery,omitempty"`
}
Expand Down