Class: Pingram::GetLogsResponseMessagesInner
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Pingram::GetLogsResponseMessagesInner
- Defined in:
- lib/pingram/models/get_logs_response_messages_inner.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#attachments ⇒ Object
Returns the value of attribute attachments.
-
#bcc ⇒ Object
Returns the value of attribute bcc.
-
#body_html ⇒ Object
Returns the value of attribute body_html.
-
#body_text ⇒ Object
Returns the value of attribute body_text.
-
#cc ⇒ Object
Returns the value of attribute cc.
-
#epoch_ms ⇒ Object
Returns the value of attribute epoch_ms.
-
#event_type ⇒ Object
Returns the value of attribute event_type.
-
#from ⇒ Object
Returns the value of attribute from.
-
#from_name ⇒ Object
Returns the value of attribute from_name.
-
#in_reply_to ⇒ Object
Returns the value of attribute in_reply_to.
-
#inbox ⇒ Object
Returns the value of attribute inbox.
-
#message_id ⇒ Object
Returns the value of attribute message_id.
-
#references ⇒ Object
Returns the value of attribute references.
-
#reply_to ⇒ Object
Returns the value of attribute reply_to.
-
#resolution_type ⇒ Object
Returns the value of attribute resolution_type.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#to ⇒ Object
Returns the value of attribute to.
-
#tracking_id ⇒ Object
Returns the value of attribute tracking_id.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GetLogsResponseMessagesInner
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ GetLogsResponseMessagesInner
Initializes the object
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 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 146 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetLogsResponseMessagesInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetLogsResponseMessagesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'tracking_id') self.tracking_id = attributes[:'tracking_id'] else self.tracking_id = nil end if attributes.key?(:'event_type') self.event_type = attributes[:'event_type'] else self.event_type = nil end if attributes.key?(:'timestamp') self. = attributes[:'timestamp'] else self. = nil end if attributes.key?(:'epoch_ms') self.epoch_ms = attributes[:'epoch_ms'] else self.epoch_ms = nil end if attributes.key?(:'inbox') self.inbox = attributes[:'inbox'] end if attributes.key?(:'from') self.from = attributes[:'from'] end if attributes.key?(:'from_name') self.from_name = attributes[:'from_name'] end if attributes.key?(:'subject') self.subject = attributes[:'subject'] end if attributes.key?(:'to') if (value = attributes[:'to']).is_a?(Array) self.to = value end end if attributes.key?(:'cc') if (value = attributes[:'cc']).is_a?(Array) self.cc = value end end if attributes.key?(:'bcc') if (value = attributes[:'bcc']).is_a?(Array) self.bcc = value end end if attributes.key?(:'reply_to') self.reply_to = attributes[:'reply_to'] end if attributes.key?(:'body_text') self.body_text = attributes[:'body_text'] end if attributes.key?(:'body_html') self.body_html = attributes[:'body_html'] end if attributes.key?(:'attachments') if (value = attributes[:'attachments']).is_a?(Array) self. = value end end if attributes.key?(:'message_id') self. = attributes[:'message_id'] end if attributes.key?(:'in_reply_to') self.in_reply_to = attributes[:'in_reply_to'] end if attributes.key?(:'references') self.references = attributes[:'references'] end if attributes.key?(:'resolution_type') self.resolution_type = attributes[:'resolution_type'] end end |
Instance Attribute Details
#attachments ⇒ Object
Returns the value of attribute attachments.
46 47 48 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 46 def @attachments end |
#bcc ⇒ Object
Returns the value of attribute bcc.
38 39 40 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 38 def bcc @bcc end |
#body_html ⇒ Object
Returns the value of attribute body_html.
44 45 46 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 44 def body_html @body_html end |
#body_text ⇒ Object
Returns the value of attribute body_text.
42 43 44 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 42 def body_text @body_text end |
#cc ⇒ Object
Returns the value of attribute cc.
36 37 38 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 36 def cc @cc end |
#epoch_ms ⇒ Object
Returns the value of attribute epoch_ms.
24 25 26 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 24 def epoch_ms @epoch_ms end |
#event_type ⇒ Object
Returns the value of attribute event_type.
20 21 22 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 20 def event_type @event_type end |
#from ⇒ Object
Returns the value of attribute from.
28 29 30 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 28 def from @from end |
#from_name ⇒ Object
Returns the value of attribute from_name.
30 31 32 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 30 def from_name @from_name end |
#in_reply_to ⇒ Object
Returns the value of attribute in_reply_to.
50 51 52 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 50 def in_reply_to @in_reply_to end |
#inbox ⇒ Object
Returns the value of attribute inbox.
26 27 28 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 26 def inbox @inbox end |
#message_id ⇒ Object
Returns the value of attribute message_id.
48 49 50 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 48 def @message_id end |
#references ⇒ Object
Returns the value of attribute references.
52 53 54 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 52 def references @references end |
#reply_to ⇒ Object
Returns the value of attribute reply_to.
40 41 42 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 40 def reply_to @reply_to end |
#resolution_type ⇒ Object
Returns the value of attribute resolution_type.
54 55 56 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 54 def resolution_type @resolution_type end |
#subject ⇒ Object
Returns the value of attribute subject.
32 33 34 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 32 def subject @subject end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
22 23 24 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 22 def @timestamp end |
#to ⇒ Object
Returns the value of attribute to.
34 35 36 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 34 def to @to end |
#tracking_id ⇒ Object
Returns the value of attribute tracking_id.
18 19 20 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 18 def tracking_id @tracking_id end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
104 105 106 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 104 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
109 110 111 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 109 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 79 def self.attribute_map { :'tracking_id' => :'trackingId', :'event_type' => :'eventType', :'timestamp' => :'timestamp', :'epoch_ms' => :'epochMs', :'inbox' => :'inbox', :'from' => :'from', :'from_name' => :'fromName', :'subject' => :'subject', :'to' => :'to', :'cc' => :'cc', :'bcc' => :'bcc', :'reply_to' => :'replyTo', :'body_text' => :'bodyText', :'body_html' => :'bodyHtml', :'attachments' => :'attachments', :'message_id' => :'messageId', :'in_reply_to' => :'inReplyTo', :'references' => :'references', :'resolution_type' => :'resolutionType' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 381 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
139 140 141 142 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 139 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 114 def self.openapi_types { :'tracking_id' => :'String', :'event_type' => :'String', :'timestamp' => :'String', :'epoch_ms' => :'Float', :'inbox' => :'String', :'from' => :'String', :'from_name' => :'String', :'subject' => :'String', :'to' => :'Array<String>', :'cc' => :'Array<String>', :'bcc' => :'Array<String>', :'reply_to' => :'String', :'body_text' => :'String', :'body_html' => :'String', :'attachments' => :'Array<GetLogsResponseMessagesInnerAttachmentsInner>', :'message_id' => :'String', :'in_reply_to' => :'String', :'references' => :'String', :'resolution_type' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 342 def ==(o) return true if self.equal?(o) self.class == o.class && tracking_id == o.tracking_id && event_type == o.event_type && == o. && epoch_ms == o.epoch_ms && inbox == o.inbox && from == o.from && from_name == o.from_name && subject == o.subject && to == o.to && cc == o.cc && bcc == o.bcc && reply_to == o.reply_to && body_text == o.body_text && body_html == o.body_html && == o. && == o. && in_reply_to == o.in_reply_to && references == o.references && resolution_type == o.resolution_type end |
#eql?(o) ⇒ Boolean
368 369 370 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 368 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
374 375 376 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 374 def hash [tracking_id, event_type, , epoch_ms, inbox, from, from_name, subject, to, cc, bcc, reply_to, body_text, body_html, , , in_reply_to, references, resolution_type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 255 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @tracking_id.nil? invalid_properties.push('invalid value for "tracking_id", tracking_id cannot be nil.') end if @event_type.nil? invalid_properties.push('invalid value for "event_type", event_type cannot be nil.') end if @timestamp.nil? invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.') end if @epoch_ms.nil? invalid_properties.push('invalid value for "epoch_ms", epoch_ms cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 403 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
279 280 281 282 283 284 285 286 287 288 |
# File 'lib/pingram/models/get_logs_response_messages_inner.rb', line 279 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @tracking_id.nil? return false if @event_type.nil? return false if @timestamp.nil? return false if @epoch_ms.nil? resolution_type_validator = EnumAttributeValidator.new('String', ["reply", "builtin", "custom"]) return false unless resolution_type_validator.valid?(@resolution_type) true end |