Class: ESIClient::GetCharactersCharacterIdStatsSocial
- Inherits:
-
Object
- Object
- ESIClient::GetCharactersCharacterIdStatsSocial
- Defined in:
- lib/esi_client/models/get_characters_character_id_stats_social.rb
Overview
social object
Instance Attribute Summary collapse
-
#add_contact_bad ⇒ Object
add_contact_bad integer.
-
#add_contact_good ⇒ Object
add_contact_good integer.
-
#add_contact_high ⇒ Object
add_contact_high integer.
-
#add_contact_horrible ⇒ Object
add_contact_horrible integer.
-
#add_contact_neutral ⇒ Object
add_contact_neutral integer.
-
#add_note ⇒ Object
add_note integer.
-
#added_as_contact_bad ⇒ Object
added_as_contact_bad integer.
-
#added_as_contact_good ⇒ Object
added_as_contact_good integer.
-
#added_as_contact_high ⇒ Object
added_as_contact_high integer.
-
#added_as_contact_horrible ⇒ Object
added_as_contact_horrible integer.
-
#added_as_contact_neutral ⇒ Object
added_as_contact_neutral integer.
-
#calendar_event_created ⇒ Object
calendar_event_created integer.
-
#chat_messages_alliance ⇒ Object
chat_messages_alliance integer.
-
#chat_messages_constellation ⇒ Object
chat_messages_constellation integer.
-
#chat_messages_corporation ⇒ Object
chat_messages_corporation integer.
-
#chat_messages_fleet ⇒ Object
chat_messages_fleet integer.
-
#chat_messages_region ⇒ Object
chat_messages_region integer.
-
#chat_messages_solarsystem ⇒ Object
chat_messages_solarsystem integer.
-
#chat_messages_warfaction ⇒ Object
chat_messages_warfaction integer.
-
#chat_total_message_length ⇒ Object
chat_total_message_length integer.
-
#direct_trades ⇒ Object
direct_trades integer.
-
#fleet_broadcasts ⇒ Object
fleet_broadcasts integer.
-
#fleet_joins ⇒ Object
fleet_joins integer.
-
#mails_received ⇒ Object
mails_received integer.
-
#mails_sent ⇒ Object
mails_sent integer.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GetCharactersCharacterIdStatsSocial
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ GetCharactersCharacterIdStatsSocial
Initializes the object
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 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 157 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'add_contact_bad') self.add_contact_bad = attributes[:'add_contact_bad'] end if attributes.has_key?(:'add_contact_good') self.add_contact_good = attributes[:'add_contact_good'] end if attributes.has_key?(:'add_contact_high') self.add_contact_high = attributes[:'add_contact_high'] end if attributes.has_key?(:'add_contact_horrible') self.add_contact_horrible = attributes[:'add_contact_horrible'] end if attributes.has_key?(:'add_contact_neutral') self.add_contact_neutral = attributes[:'add_contact_neutral'] end if attributes.has_key?(:'add_note') self.add_note = attributes[:'add_note'] end if attributes.has_key?(:'added_as_contact_bad') self.added_as_contact_bad = attributes[:'added_as_contact_bad'] end if attributes.has_key?(:'added_as_contact_good') self.added_as_contact_good = attributes[:'added_as_contact_good'] end if attributes.has_key?(:'added_as_contact_high') self.added_as_contact_high = attributes[:'added_as_contact_high'] end if attributes.has_key?(:'added_as_contact_horrible') self.added_as_contact_horrible = attributes[:'added_as_contact_horrible'] end if attributes.has_key?(:'added_as_contact_neutral') self.added_as_contact_neutral = attributes[:'added_as_contact_neutral'] end if attributes.has_key?(:'calendar_event_created') self.calendar_event_created = attributes[:'calendar_event_created'] end if attributes.has_key?(:'chat_messages_alliance') self. = attributes[:'chat_messages_alliance'] end if attributes.has_key?(:'chat_messages_constellation') self. = attributes[:'chat_messages_constellation'] end if attributes.has_key?(:'chat_messages_corporation') self. = attributes[:'chat_messages_corporation'] end if attributes.has_key?(:'chat_messages_fleet') self. = attributes[:'chat_messages_fleet'] end if attributes.has_key?(:'chat_messages_region') self. = attributes[:'chat_messages_region'] end if attributes.has_key?(:'chat_messages_solarsystem') self. = attributes[:'chat_messages_solarsystem'] end if attributes.has_key?(:'chat_messages_warfaction') self. = attributes[:'chat_messages_warfaction'] end if attributes.has_key?(:'chat_total_message_length') self. = attributes[:'chat_total_message_length'] end if attributes.has_key?(:'direct_trades') self.direct_trades = attributes[:'direct_trades'] end if attributes.has_key?(:'fleet_broadcasts') self.fleet_broadcasts = attributes[:'fleet_broadcasts'] end if attributes.has_key?(:'fleet_joins') self.fleet_joins = attributes[:'fleet_joins'] end if attributes.has_key?(:'mails_received') self.mails_received = attributes[:'mails_received'] end if attributes.has_key?(:'mails_sent') self.mails_sent = attributes[:'mails_sent'] end end |
Instance Attribute Details
#add_contact_bad ⇒ Object
add_contact_bad integer
19 20 21 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 19 def add_contact_bad @add_contact_bad end |
#add_contact_good ⇒ Object
add_contact_good integer
22 23 24 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 22 def add_contact_good @add_contact_good end |
#add_contact_high ⇒ Object
add_contact_high integer
25 26 27 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 25 def add_contact_high @add_contact_high end |
#add_contact_horrible ⇒ Object
add_contact_horrible integer
28 29 30 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 28 def add_contact_horrible @add_contact_horrible end |
#add_contact_neutral ⇒ Object
add_contact_neutral integer
31 32 33 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 31 def add_contact_neutral @add_contact_neutral end |
#add_note ⇒ Object
add_note integer
34 35 36 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 34 def add_note @add_note end |
#added_as_contact_bad ⇒ Object
added_as_contact_bad integer
37 38 39 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 37 def added_as_contact_bad @added_as_contact_bad end |
#added_as_contact_good ⇒ Object
added_as_contact_good integer
40 41 42 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 40 def added_as_contact_good @added_as_contact_good end |
#added_as_contact_high ⇒ Object
added_as_contact_high integer
43 44 45 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 43 def added_as_contact_high @added_as_contact_high end |
#added_as_contact_horrible ⇒ Object
added_as_contact_horrible integer
46 47 48 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 46 def added_as_contact_horrible @added_as_contact_horrible end |
#added_as_contact_neutral ⇒ Object
added_as_contact_neutral integer
49 50 51 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 49 def added_as_contact_neutral @added_as_contact_neutral end |
#calendar_event_created ⇒ Object
calendar_event_created integer
52 53 54 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 52 def calendar_event_created @calendar_event_created end |
#chat_messages_alliance ⇒ Object
chat_messages_alliance integer
55 56 57 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 55 def @chat_messages_alliance end |
#chat_messages_constellation ⇒ Object
chat_messages_constellation integer
58 59 60 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 58 def @chat_messages_constellation end |
#chat_messages_corporation ⇒ Object
chat_messages_corporation integer
61 62 63 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 61 def @chat_messages_corporation end |
#chat_messages_fleet ⇒ Object
chat_messages_fleet integer
64 65 66 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 64 def @chat_messages_fleet end |
#chat_messages_region ⇒ Object
chat_messages_region integer
67 68 69 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 67 def @chat_messages_region end |
#chat_messages_solarsystem ⇒ Object
chat_messages_solarsystem integer
70 71 72 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 70 def @chat_messages_solarsystem end |
#chat_messages_warfaction ⇒ Object
chat_messages_warfaction integer
73 74 75 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 73 def @chat_messages_warfaction end |
#chat_total_message_length ⇒ Object
chat_total_message_length integer
76 77 78 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 76 def @chat_total_message_length end |
#direct_trades ⇒ Object
direct_trades integer
79 80 81 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 79 def direct_trades @direct_trades end |
#fleet_broadcasts ⇒ Object
fleet_broadcasts integer
82 83 84 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 82 def fleet_broadcasts @fleet_broadcasts end |
#fleet_joins ⇒ Object
fleet_joins integer
85 86 87 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 85 def fleet_joins @fleet_joins end |
#mails_received ⇒ Object
mails_received integer
88 89 90 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 88 def mails_received @mails_received end |
#mails_sent ⇒ Object
mails_sent integer
91 92 93 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 91 def mails_sent @mails_sent end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 94 def self.attribute_map { :'add_contact_bad' => :'add_contact_bad', :'add_contact_good' => :'add_contact_good', :'add_contact_high' => :'add_contact_high', :'add_contact_horrible' => :'add_contact_horrible', :'add_contact_neutral' => :'add_contact_neutral', :'add_note' => :'add_note', :'added_as_contact_bad' => :'added_as_contact_bad', :'added_as_contact_good' => :'added_as_contact_good', :'added_as_contact_high' => :'added_as_contact_high', :'added_as_contact_horrible' => :'added_as_contact_horrible', :'added_as_contact_neutral' => :'added_as_contact_neutral', :'calendar_event_created' => :'calendar_event_created', :'chat_messages_alliance' => :'chat_messages_alliance', :'chat_messages_constellation' => :'chat_messages_constellation', :'chat_messages_corporation' => :'chat_messages_corporation', :'chat_messages_fleet' => :'chat_messages_fleet', :'chat_messages_region' => :'chat_messages_region', :'chat_messages_solarsystem' => :'chat_messages_solarsystem', :'chat_messages_warfaction' => :'chat_messages_warfaction', :'chat_total_message_length' => :'chat_total_message_length', :'direct_trades' => :'direct_trades', :'fleet_broadcasts' => :'fleet_broadcasts', :'fleet_joins' => :'fleet_joins', :'mails_received' => :'mails_received', :'mails_sent' => :'mails_sent' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 125 def self.swagger_types { :'add_contact_bad' => :'Integer', :'add_contact_good' => :'Integer', :'add_contact_high' => :'Integer', :'add_contact_horrible' => :'Integer', :'add_contact_neutral' => :'Integer', :'add_note' => :'Integer', :'added_as_contact_bad' => :'Integer', :'added_as_contact_good' => :'Integer', :'added_as_contact_high' => :'Integer', :'added_as_contact_horrible' => :'Integer', :'added_as_contact_neutral' => :'Integer', :'calendar_event_created' => :'Integer', :'chat_messages_alliance' => :'Integer', :'chat_messages_constellation' => :'Integer', :'chat_messages_corporation' => :'Integer', :'chat_messages_fleet' => :'Integer', :'chat_messages_region' => :'Integer', :'chat_messages_solarsystem' => :'Integer', :'chat_messages_warfaction' => :'Integer', :'chat_total_message_length' => :'Integer', :'direct_trades' => :'Integer', :'fleet_broadcasts' => :'Integer', :'fleet_joins' => :'Integer', :'mails_received' => :'Integer', :'mails_sent' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 279 def ==(o) return true if self.equal?(o) self.class == o.class && add_contact_bad == o.add_contact_bad && add_contact_good == o.add_contact_good && add_contact_high == o.add_contact_high && add_contact_horrible == o.add_contact_horrible && add_contact_neutral == o.add_contact_neutral && add_note == o.add_note && added_as_contact_bad == o.added_as_contact_bad && added_as_contact_good == o.added_as_contact_good && added_as_contact_high == o.added_as_contact_high && added_as_contact_horrible == o.added_as_contact_horrible && added_as_contact_neutral == o.added_as_contact_neutral && calendar_event_created == o.calendar_event_created && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && direct_trades == o.direct_trades && fleet_broadcasts == o.fleet_broadcasts && fleet_joins == o.fleet_joins && mails_received == o.mails_received && mails_sent == o.mails_sent end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 345 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = ESIClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 411 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 324 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
311 312 313 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 311 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
317 318 319 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 317 def hash [add_contact_bad, add_contact_good, add_contact_high, add_contact_horrible, add_contact_neutral, add_note, added_as_contact_bad, added_as_contact_good, added_as_contact_high, added_as_contact_horrible, added_as_contact_neutral, calendar_event_created, , , , , , , , , direct_trades, fleet_broadcasts, fleet_joins, mails_received, mails_sent].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
266 267 268 269 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 266 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
391 392 393 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 391 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
397 398 399 400 401 402 403 404 405 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 397 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
385 386 387 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 385 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
273 274 275 |
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 273 def valid? true end |