Class: DatadogAPIClient::V1::EventCreateResponse
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::EventCreateResponse
- Defined in:
- lib/datadog_api_client/v1/models/event_create_response.rb
Overview
Object containing an event response.
Instance Attribute Summary collapse
-
#alert_type ⇒ Object
Returns the value of attribute alert_type.
-
#date_happened ⇒ Object
POSIX timestamp of the event.
-
#device_name ⇒ Object
A device name.
-
#host ⇒ Object
Host name to associate with the event.
-
#id ⇒ Object
Integer ID of the event.
-
#payload ⇒ Object
Payload of the event.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#related_event_id ⇒ Object
ID of the parent event.
-
#source_type_name ⇒ Object
The type of event being posted.
-
#status ⇒ Object
A status.
-
#tags ⇒ Object
A list of tags to apply to the event.
-
#text ⇒ Object
The body of the event.
-
#title ⇒ Object
The event title.
-
#url ⇒ Object
URL of the event.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ EventCreateResponse
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ EventCreateResponse
Initializes the object
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. = 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. = 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_type ⇒ Object
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_happened ⇒ Object
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_name ⇒ Object
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 |
#host ⇒ Object
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 |
#id ⇒ Object
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 |
#payload ⇒ Object
Payload of the event.
41 42 43 |
# File 'lib/datadog_api_client/v1/models/event_create_response.rb', line 41 def payload @payload end |
#priority ⇒ Object
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 |
#related_event_id ⇒ Object
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 end |
#source_type_name ⇒ Object
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 |
#status ⇒ Object
A status.
52 53 54 |
# File 'lib/datadog_api_client/v1/models/event_create_response.rb', line 52 def status @status end |
#tags ⇒ Object
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 end |
#text ⇒ Object
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 |
#title ⇒ Object
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 |
#url ⇒ Object
URL of the event.
64 65 66 |
# File 'lib/datadog_api_client/v1/models/event_create_response.rb', line 64 def url @url end |