Class: ESI::GetCorporationsCorporationIdStarbasesStarbaseIdOk

Inherits:
Object
  • Object
show all
Defined in:
lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb

Overview

200 ok object

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ GetCorporationsCorporationIdStarbasesStarbaseIdOk

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 124

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

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

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

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

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

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

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

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

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

  if attributes.has_key?(:'fuels')
    if (value = attributes[:'fuels']).is_a?(Array)
      self.fuels = value
    end
  end

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

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

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

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

end

Instance Attribute Details

#allow_alliance_membersObject

allow_alliance_members boolean



19
20
21
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 19

def allow_alliance_members
  @allow_alliance_members
end

#allow_corporation_membersObject

allow_corporation_members boolean



22
23
24
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 22

def allow_corporation_members
  @allow_corporation_members
end

#anchorObject

Who can anchor starbase (POS) and its structures



25
26
27
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 25

def anchor
  @anchor
end

#attack_if_at_warObject

attack_if_at_war boolean



28
29
30
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 28

def attack_if_at_war
  @attack_if_at_war
end

#attack_if_other_security_status_droppingObject

attack_if_other_security_status_dropping boolean



31
32
33
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 31

def attack_if_other_security_status_dropping
  @attack_if_other_security_status_dropping
end

#attack_security_status_thresholdObject

Starbase (POS) will attack if target’s security standing is lower than this value



34
35
36
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 34

def attack_security_status_threshold
  @attack_security_status_threshold
end

#attack_standing_thresholdObject

Starbase (POS) will attack if target’s standing is lower than this value



37
38
39
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 37

def attack_standing_threshold
  @attack_standing_threshold
end

#fuel_bay_takeObject

Who can take fuel blocks out of the starbase (POS)‘s fuel bay



40
41
42
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 40

def fuel_bay_take
  @fuel_bay_take
end

#fuel_bay_viewObject

Who can view the starbase (POS)‘s fule bay. Characters either need to have required role or belong to the starbase (POS) owner’s corporation or alliance, as described by the enum, all other access settings follows the same scheme



43
44
45
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 43

def fuel_bay_view
  @fuel_bay_view
end

#fuelsObject

Fuel blocks and other things that will be consumed when operating a starbase (POS)



46
47
48
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 46

def fuels
  @fuels
end

#offlineObject

Who can offline starbase (POS) and its structures



49
50
51
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 49

def offline
  @offline
end

#onlineObject

Who can online starbase (POS) and its structures



52
53
54
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 52

def online
  @online
end

#unanchorObject

Who can unanchor starbase (POS) and its structures



55
56
57
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 55

def unanchor
  @unanchor
end

#use_alliance_standingsObject

True if the starbase (POS) is using alliance standings, otherwise using corporation’s



58
59
60
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 58

def use_alliance_standings
  @use_alliance_standings
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 83

def self.attribute_map
  {
    :'allow_alliance_members' => :'allow_alliance_members',
    :'allow_corporation_members' => :'allow_corporation_members',
    :'anchor' => :'anchor',
    :'attack_if_at_war' => :'attack_if_at_war',
    :'attack_if_other_security_status_dropping' => :'attack_if_other_security_status_dropping',
    :'attack_security_status_threshold' => :'attack_security_status_threshold',
    :'attack_standing_threshold' => :'attack_standing_threshold',
    :'fuel_bay_take' => :'fuel_bay_take',
    :'fuel_bay_view' => :'fuel_bay_view',
    :'fuels' => :'fuels',
    :'offline' => :'offline',
    :'online' => :'online',
    :'unanchor' => :'unanchor',
    :'use_alliance_standings' => :'use_alliance_standings'
  }
end

.swagger_typesObject

Attribute type mapping.



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 103

def self.swagger_types
  {
    :'allow_alliance_members' => :'BOOLEAN',
    :'allow_corporation_members' => :'BOOLEAN',
    :'anchor' => :'String',
    :'attack_if_at_war' => :'BOOLEAN',
    :'attack_if_other_security_status_dropping' => :'BOOLEAN',
    :'attack_security_status_threshold' => :'Float',
    :'attack_standing_threshold' => :'Float',
    :'fuel_bay_take' => :'String',
    :'fuel_bay_view' => :'String',
    :'fuels' => :'Array<GetCorporationsCorporationIdStarbasesStarbaseIdFuel>',
    :'offline' => :'String',
    :'online' => :'String',
    :'unanchor' => :'String',
    :'use_alliance_standings' => :'BOOLEAN'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 332

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      allow_alliance_members == o.allow_alliance_members &&
      allow_corporation_members == o.allow_corporation_members &&
      anchor == o.anchor &&
      attack_if_at_war == o.attack_if_at_war &&
      attack_if_other_security_status_dropping == o.attack_if_other_security_status_dropping &&
      attack_security_status_threshold == o.attack_security_status_threshold &&
      attack_standing_threshold == o.attack_standing_threshold &&
      fuel_bay_take == o.fuel_bay_take &&
      fuel_bay_view == o.fuel_bay_view &&
      fuels == o.fuels &&
      offline == o.offline &&
      online == o.online &&
      unanchor == o.unanchor &&
      use_alliance_standings == o.use_alliance_standings
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



387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 387

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 = ESI.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



453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 453

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



366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 366

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


353
354
355
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 353

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



359
360
361
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 359

def hash
  [allow_alliance_members, allow_corporation_members, anchor, attack_if_at_war, attack_if_other_security_status_dropping, attack_security_status_threshold, attack_standing_threshold, fuel_bay_take, fuel_bay_view, fuels, offline, online, unanchor, use_alliance_standings].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 192

def list_invalid_properties
  invalid_properties = Array.new
  if @allow_alliance_members.nil?
    invalid_properties.push("invalid value for 'allow_alliance_members', allow_alliance_members cannot be nil.")
  end

  if @allow_corporation_members.nil?
    invalid_properties.push("invalid value for 'allow_corporation_members', allow_corporation_members cannot be nil.")
  end

  if @anchor.nil?
    invalid_properties.push("invalid value for 'anchor', anchor cannot be nil.")
  end

  if @attack_if_at_war.nil?
    invalid_properties.push("invalid value for 'attack_if_at_war', attack_if_at_war cannot be nil.")
  end

  if @attack_if_other_security_status_dropping.nil?
    invalid_properties.push("invalid value for 'attack_if_other_security_status_dropping', attack_if_other_security_status_dropping cannot be nil.")
  end

  if @fuel_bay_take.nil?
    invalid_properties.push("invalid value for 'fuel_bay_take', fuel_bay_take cannot be nil.")
  end

  if @fuel_bay_view.nil?
    invalid_properties.push("invalid value for 'fuel_bay_view', fuel_bay_view cannot be nil.")
  end

  if @offline.nil?
    invalid_properties.push("invalid value for 'offline', offline cannot be nil.")
  end

  if @online.nil?
    invalid_properties.push("invalid value for 'online', online cannot be nil.")
  end

  if @unanchor.nil?
    invalid_properties.push("invalid value for 'unanchor', unanchor cannot be nil.")
  end

  if @use_alliance_standings.nil?
    invalid_properties.push("invalid value for 'use_alliance_standings', use_alliance_standings cannot be nil.")
  end

  return 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



433
434
435
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 433

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



439
440
441
442
443
444
445
446
447
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 439

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



427
428
429
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 427

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



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/esi-client-bvv/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 243

def valid?
  return false if @allow_alliance_members.nil?
  return false if @allow_corporation_members.nil?
  return false if @anchor.nil?
  anchor_validator = EnumAttributeValidator.new('String', ["alliance_member", "config_starbase_equipment_role", "corporation_member", "starbase_fuel_technician_role"])
  return false unless anchor_validator.valid?(@anchor)
  return false if @attack_if_at_war.nil?
  return false if @attack_if_other_security_status_dropping.nil?
  return false if @fuel_bay_take.nil?
  fuel_bay_take_validator = EnumAttributeValidator.new('String', ["alliance_member", "config_starbase_equipment_role", "corporation_member", "starbase_fuel_technician_role"])
  return false unless fuel_bay_take_validator.valid?(@fuel_bay_take)
  return false if @fuel_bay_view.nil?
  fuel_bay_view_validator = EnumAttributeValidator.new('String', ["alliance_member", "config_starbase_equipment_role", "corporation_member", "starbase_fuel_technician_role"])
  return false unless fuel_bay_view_validator.valid?(@fuel_bay_view)
  return false if @offline.nil?
  offline_validator = EnumAttributeValidator.new('String', ["alliance_member", "config_starbase_equipment_role", "corporation_member", "starbase_fuel_technician_role"])
  return false unless offline_validator.valid?(@offline)
  return false if @online.nil?
  online_validator = EnumAttributeValidator.new('String', ["alliance_member", "config_starbase_equipment_role", "corporation_member", "starbase_fuel_technician_role"])
  return false unless online_validator.valid?(@online)
  return false if @unanchor.nil?
  unanchor_validator = EnumAttributeValidator.new('String', ["alliance_member", "config_starbase_equipment_role", "corporation_member", "starbase_fuel_technician_role"])
  return false unless unanchor_validator.valid?(@unanchor)
  return false if @use_alliance_standings.nil?
  return true
end