Class: DatadogAPIClient::V1::MonitorUpdateRequest

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

Overview

Object describing a monitor update request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MonitorUpdateRequest

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/datadog_api_client/v1/models/monitor_update_request.rb', line 131

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

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.key?(:'state')
    self.state = attributes[:'state']
  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

#createdObject

Timestamp of the monitor creation.



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

def created
  @created
end

#creatorObject

Returns the value of attribute creator.



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

def creator
  @creator
end

#deletedObject

Whether or not the monitor is deleted. (Always ‘null`)



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

def deleted
  @deleted
end

#idObject

ID of this monitor.



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

def id
  @id
end

#messageObject

A message to include with notifications for this monitor.



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

def message
  @message
end

#modifiedObject

Last timestamp when the monitor was edited.



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

def modified
  @modified
end

#multiObject

Whether or not the monitor is broken down on different groups.



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

def multi
  @multi
end

#nameObject

The monitor name.



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

def name
  @name
end

#optionsObject

Returns the value of attribute options.



49
50
51
# File 'lib/datadog_api_client/v1/models/monitor_update_request.rb', line 49

def options
  @options
end

#overall_stateObject

Returns the value of attribute overall_state.



51
52
53
# File 'lib/datadog_api_client/v1/models/monitor_update_request.rb', line 51

def overall_state
  @overall_state
end

#priorityObject

Integer from 1 (high) to 5 (low) indicating alert severity.



54
55
56
# File 'lib/datadog_api_client/v1/models/monitor_update_request.rb', line 54

def priority
  @priority
end

#queryObject

The monitor query.



57
58
59
# File 'lib/datadog_api_client/v1/models/monitor_update_request.rb', line 57

def query
  @query
end

#restricted_rolesObject

A list of role identifiers that can be pulled from the Roles API. Cannot be used with ‘locked` option.



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

def restricted_roles
  @restricted_roles
end

#stateObject

Returns the value of attribute state.



62
63
64
# File 'lib/datadog_api_client/v1/models/monitor_update_request.rb', line 62

def state
  @state
end

#tagsObject

Tags associated to your monitor.



65
66
67
# File 'lib/datadog_api_client/v1/models/monitor_update_request.rb', line 65

def tags
  @tags
end

#typeObject

Returns the value of attribute type.



67
68
69
# File 'lib/datadog_api_client/v1/models/monitor_update_request.rb', line 67

def type
  @type
end