Class: DatadogAPIClient::V1::MonitorSearchResult

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

Overview

Holds search results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MonitorSearchResult

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 118

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#classificationObject

Classification of the monitor.



27
28
29
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 27

def classification
  @classification
end

#creatorObject

Returns the value of attribute creator.



29
30
31
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 29

def creator
  @creator
end

#idObject

ID of the monitor.



32
33
34
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 32

def id
  @id
end

#last_triggered_tsObject

Latest timestamp the monitor triggered.



35
36
37
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 35

def last_triggered_ts
  @last_triggered_ts
end

#metricsObject

Metrics used by the monitor.



38
39
40
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 38

def metrics
  @metrics
end

#nameObject

The monitor name.



41
42
43
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 41

def name
  @name
end

#notificationsObject

The notification triggered by the monitor.



44
45
46
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 44

def notifications
  @notifications
end

#org_idObject

The ID of the organization.



47
48
49
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 47

def org_id
  @org_id
end

#queryObject

The monitor query.



50
51
52
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 50

def query
  @query
end

#scopesObject

The scope(s) to which the downtime applies, for example ‘host:app2`. Provide multiple scopes as a comma-separated list, for example `env:dev,env:prod`. The resulting downtime applies to sources that matches ALL provided scopes (that is `env:dev AND env:prod`), NOT any of them.



53
54
55
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 53

def scopes
  @scopes
end

#statusObject

Returns the value of attribute status.



55
56
57
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 55

def status
  @status
end

#tagsObject

Tags associated with the monitor.



58
59
60
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 58

def tags
  @tags
end

#typeObject

Returns the value of attribute type.



60
61
62
# File 'lib/datadog_api_client/v1/models/monitor_search_result.rb', line 60

def type
  @type
end