Class: DatadogAPIClient::V1::EventCreateResponse

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

Overview

Object containing an event response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ EventCreateResponse

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
191
192
193
# File 'lib/datadog_api_client/v1/models/event_create_response.rb', line 123

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#alert_typeObject

Returns the value of attribute alert_type.



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

def alert_type
  @alert_type
end

#date_happenedObject

POSIX timestamp of the event. Must be sent as an integer (that is no quotes). Limited to events no older than 7 days.



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

def date_happened
  @date_happened
end

#device_nameObject

A device name.



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

def device_name
  @device_name
end

#hostObject

Host name to associate with the event. Any tags associated with the host are also applied to this event.



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

def host
  @host
end

#idObject

Integer ID of the event.



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

def id
  @id
end

#payloadObject

Payload of the event.



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

def payload
  @payload
end

#priorityObject

Returns the value of attribute priority.



43
44
45
# File 'lib/datadog_api_client/v1/models/event_create_response.rb', line 43

def priority
  @priority
end

ID of the parent event. Must be sent as an integer (that is no quotes).



46
47
48
# File 'lib/datadog_api_client/v1/models/event_create_response.rb', line 46

def related_event_id
  @related_event_id
end

#source_type_nameObject

The type of event being posted. Option examples include nagios, hudson, jenkins, my_apps, chef, puppet, git, bitbucket, etc. A complete list of source attribute values [available here](docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).



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

def source_type_name
  @source_type_name
end

#statusObject

A status.



52
53
54
# File 'lib/datadog_api_client/v1/models/event_create_response.rb', line 52

def status
  @status
end

#tagsObject

A list of tags to apply to the event.



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

def tags
  @tags
end

#textObject

The body of the event. Limited to 4000 characters. The text supports markdown. Use ‘msg_text` with the Datadog Ruby library.



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

def text
  @text
end

#titleObject

The event title. Limited to 100 characters. Use ‘msg_title` with the Datadog Ruby library.



61
62
63
# File 'lib/datadog_api_client/v1/models/event_create_response.rb', line 61

def title
  @title
end

#urlObject

URL of the event.



64
65
66
# File 'lib/datadog_api_client/v1/models/event_create_response.rb', line 64

def url
  @url
end