Class: DatadogAPIClient::V1::FormulaAndFunctionProcessQueryDefinition

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

Overview

Process query using formulas and functions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ FormulaAndFunctionProcessQueryDefinition

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb', line 97

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#aggregatorObject

Returns the value of attribute aggregator.



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

def aggregator
  @aggregator
end

#data_sourceObject

Returns the value of attribute data_source.



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

def data_source
  @data_source
end

#is_normalized_cpuObject

Whether to normalize the CPU percentages.



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

def is_normalized_cpu
  @is_normalized_cpu
end

#limitObject

Number of hits to return.



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

def limit
  @limit
end

#metricObject

Process metric name.



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

def metric
  @metric
end

#nameObject

Name of query for use in formulas.



40
41
42
# File 'lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb', line 40

def name
  @name
end

#sortObject

Returns the value of attribute sort.



42
43
44
# File 'lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb', line 42

def sort
  @sort
end

#tag_filtersObject

An array of tags to filter by.



45
46
47
# File 'lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb', line 45

def tag_filters
  @tag_filters
end

#text_filterObject

Text to use as filter.



48
49
50
# File 'lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb', line 48

def text_filter
  @text_filter
end