Class: DatadogAPIClient::V2::LogsGroupBy

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v2/models/logs_group_by.rb

Overview

A group by rule

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LogsGroupBy

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    attributes Model attributes in the form of hash



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/datadog_api_client/v2/models/logs_group_by.rb', line 81

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsGroupBy` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'facet')
    self.facet = attributes[:'facet']
  end

  if attributes.key?(:'histogram')
    self.histogram = attributes[:'histogram']
  end

  if attributes.key?(:'limit')
    self.limit = attributes[:'limit']
  else
    self.limit = 10
  end

  if attributes.key?(:'missing')
    self.missing = attributes[:'missing']
  end

  if attributes.key?(:'sort')
    self.sort = attributes[:'sort']
  end

  if attributes.key?(:'total')
    self.total = attributes[:'total']
  end
end

Instance Attribute Details

#facetObject

The name of the facet to use (required)



27
28
29
# File 'lib/datadog_api_client/v2/models/logs_group_by.rb', line 27

def facet
  @facet
end

#histogramObject

Returns the value of attribute histogram.



29
30
31
# File 'lib/datadog_api_client/v2/models/logs_group_by.rb', line 29

def histogram
  @histogram
end

#limitObject

The maximum buckets to return for this group by



32
33
34
# File 'lib/datadog_api_client/v2/models/logs_group_by.rb', line 32

def limit
  @limit
end

#missingObject

Returns the value of attribute missing.



34
35
36
# File 'lib/datadog_api_client/v2/models/logs_group_by.rb', line 34

def missing
  @missing
end

#sortObject

Returns the value of attribute sort.



36
37
38
# File 'lib/datadog_api_client/v2/models/logs_group_by.rb', line 36

def sort
  @sort
end

#totalObject

Returns the value of attribute total.



38
39
40
# File 'lib/datadog_api_client/v2/models/logs_group_by.rb', line 38

def total
  @total
end