Class: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb

Overview

A formula and functions events query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ FormulaAndFunctionEventQueryDefinition

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
120
121
122
# File 'lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb', line 82

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinition` 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::V1::FormulaAndFunctionEventQueryDefinition`. 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?(:'compute')
    self.compute = attributes[:'compute']
  end

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

  if attributes.key?(:'group_by')
    if (value = attributes[:'group_by']).is_a?(Array)
      self.group_by = value
    end
  end

  if attributes.key?(:'indexes')
    if (value = attributes[:'indexes']).is_a?(Array)
      self.indexes = value
    end
  end

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

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

Instance Attribute Details

#computeObject

Returns the value of attribute compute.



26
27
28
# File 'lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb', line 26

def compute
  @compute
end

#data_sourceObject

Returns the value of attribute data_source.



28
29
30
# File 'lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb', line 28

def data_source
  @data_source
end

#group_byObject

Group by options.



31
32
33
# File 'lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb', line 31

def group_by
  @group_by
end

#indexesObject

An array of index names to query in the stream. Omit or use ‘[]` to query all indexes at once.



34
35
36
# File 'lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb', line 34

def indexes
  @indexes
end

#nameObject

Name of the query for use in formulas.



37
38
39
# File 'lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb', line 37

def name
  @name
end

#searchObject

Returns the value of attribute search.



39
40
41
# File 'lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb', line 39

def search
  @search
end