Class: ESIClient::GetCharactersCharacterIdStatsSocial

Inherits:
Object
  • Object
show all
Defined in:
lib/esi_client/models/get_characters_character_id_stats_social.rb

Overview

social object

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ GetCharactersCharacterIdStatsSocial

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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.chat_messages_alliance = attributes[:'chat_messages_alliance']
  end

  if attributes.has_key?(:'chat_messages_constellation')
    self.chat_messages_constellation = attributes[:'chat_messages_constellation']
  end

  if attributes.has_key?(:'chat_messages_corporation')
    self.chat_messages_corporation = attributes[:'chat_messages_corporation']
  end

  if attributes.has_key?(:'chat_messages_fleet')
    self.chat_messages_fleet = attributes[:'chat_messages_fleet']
  end

  if attributes.has_key?(:'chat_messages_region')
    self.chat_messages_region = attributes[:'chat_messages_region']
  end

  if attributes.has_key?(:'chat_messages_solarsystem')
    self.chat_messages_solarsystem = attributes[:'chat_messages_solarsystem']
  end

  if attributes.has_key?(:'chat_messages_warfaction')
    self.chat_messages_warfaction = attributes[:'chat_messages_warfaction']
  end

  if attributes.has_key?(:'chat_total_message_length')
    self.chat_total_message_length = 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_badObject

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_goodObject

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_highObject

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_horribleObject

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_neutralObject

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_noteObject

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_badObject

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_goodObject

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_highObject

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_horribleObject

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_neutralObject

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_createdObject

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_allianceObject

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
  @chat_messages_alliance
end

#chat_messages_constellationObject

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
  @chat_messages_constellation
end

#chat_messages_corporationObject

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
  @chat_messages_corporation
end

#chat_messages_fleetObject

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
  @chat_messages_fleet
end

#chat_messages_regionObject

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
  @chat_messages_region
end

#chat_messages_solarsystemObject

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
  @chat_messages_solarsystem
end

#chat_messages_warfactionObject

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
  @chat_messages_warfaction
end

#chat_total_message_lengthObject

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
  @chat_total_message_length
end

#direct_tradesObject

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_broadcastsObject

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_joinsObject

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_receivedObject

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_sentObject

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_mapObject

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_typesObject

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.

Parameters:

  • Object (Object)

    to be compared



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 &&
      chat_messages_alliance == o.chat_messages_alliance &&
      chat_messages_constellation == o.chat_messages_constellation &&
      chat_messages_corporation == o.chat_messages_corporation &&
      chat_messages_fleet == o.chat_messages_fleet &&
      chat_messages_region == o.chat_messages_region &&
      chat_messages_solarsystem == o.chat_messages_solarsystem &&
      chat_messages_warfaction == o.chat_messages_warfaction &&
      chat_total_message_length == o.chat_total_message_length &&
      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

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


311
312
313
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 311

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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, chat_messages_alliance, chat_messages_constellation, chat_messages_corporation, chat_messages_fleet, chat_messages_region, chat_messages_solarsystem, chat_messages_warfaction, chat_total_message_length, direct_trades, fleet_broadcasts, fleet_joins, mails_received, mails_sent].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



391
392
393
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 391

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation 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

Returns:

  • (Boolean)

    true if the model is valid



273
274
275
# File 'lib/esi_client/models/get_characters_character_id_stats_social.rb', line 273

def valid?
  true
end