Skip to content

Commit 97ed528

Browse files
authored
Merge pull request #197 from dharada1/feature/add_option_enable_logs_sample
Add enable_logs_sample option for log monitor
2 parents f3f6d2f + aac3f18 commit 97ed528

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

datadog-accessors.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5469,6 +5469,37 @@ func (m *Monitor) SetType(v string) {
54695469
m.Type = &v
54705470
}
54715471

5472+
// GetEnableLogsSample returns the EnableLogsSample field if non-nil, zero value otherwise.
5473+
func (o *Options) GetEnableLogsSample() bool {
5474+
if o == nil || o.EnableLogsSample == nil {
5475+
return false
5476+
}
5477+
return *o.EnableLogsSample
5478+
}
5479+
5480+
// GetEnableLogsSampleOk returns a tuple with the EnableLogsSample field if it's non-nil, zero value otherwise
5481+
// and a boolean to check if the value has been set.
5482+
func (o *Options) GetEnableLogsSampleOk() (bool, bool) {
5483+
if o == nil || o.EnableLogsSample == nil {
5484+
return false, false
5485+
}
5486+
return *o.EnableLogsSample, true
5487+
}
5488+
5489+
// HasEnableLogsSample returns a boolean if a field has been set.
5490+
func (o *Options) HasEnableLogsSample() bool {
5491+
if o != nil && o.EnableLogsSample != nil {
5492+
return true
5493+
}
5494+
5495+
return false
5496+
}
5497+
5498+
// SetEnableLogsSample allocates a new o.EnableLogsSample and returns the pointer to it.
5499+
func (o *Options) SetEnableLogsSample(v bool) {
5500+
o.EnableLogsSample = &v
5501+
}
5502+
54725503
// GetEscalationMessage returns the EscalationMessage field if non-nil, zero value otherwise.
54735504
func (o *Options) GetEscalationMessage() string {
54745505
if o == nil || o.EscalationMessage == nil {

monitors.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ type Options struct {
6161
IncludeTags *bool `json:"include_tags,omitempty"`
6262
RequireFullWindow *bool `json:"require_full_window,omitempty"`
6363
Locked *bool `json:"locked,omitempty"`
64+
EnableLogsSample *bool `json:"enable_logs_sample,omitempty"`
6465
}
6566

6667
type TriggeringValue struct {

0 commit comments

Comments
 (0)