Class: ESI::GetCorporationsCorporationIdStarbasesStarbaseIdOk
- Inherits:
-
Object
- Object
- ESI::GetCorporationsCorporationIdStarbasesStarbaseIdOk
- Defined in:
- lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb
Overview
200 ok object
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#allow_alliance_members ⇒ Object
allow_alliance_members boolean.
-
#allow_corporation_members ⇒ Object
allow_corporation_members boolean.
-
#anchor ⇒ Object
Who can anchor starbase (POS) and its structures.
-
#attack_if_at_war ⇒ Object
attack_if_at_war boolean.
-
#attack_if_other_security_status_dropping ⇒ Object
attack_if_other_security_status_dropping boolean.
-
#attack_security_status_threshold ⇒ Object
Starbase (POS) will attack if target’s security standing is lower than this value.
-
#attack_standing_threshold ⇒ Object
Starbase (POS) will attack if target’s standing is lower than this value.
-
#fuel_bay_take ⇒ Object
Who can take fuel blocks out of the starbase (POS)‘s fuel bay.
-
#fuel_bay_view ⇒ Object
Who can view the starbase (POS)‘s fule bay.
-
#fuels ⇒ Object
Fuel blocks and other things that will be consumed when operating a starbase (POS).
-
#offline ⇒ Object
Who can offline starbase (POS) and its structures.
-
#online ⇒ Object
Who can online starbase (POS) and its structures.
-
#unanchor ⇒ Object
Who can unanchor starbase (POS) and its structures.
-
#use_alliance_standings ⇒ Object
True if the starbase (POS) is using alliance standings, otherwise using corporation’s.
Class Method Summary collapse
-
.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.
-
#_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 ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GetCorporationsCorporationIdStarbasesStarbaseIdOk
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 = {}) ⇒ GetCorporationsCorporationIdStarbasesStarbaseIdOk
Initializes the object
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 194 195 196 197 198 199 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 129 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `ESI::GetCorporationsCorporationIdStarbasesStarbaseIdOk` 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 `ESI::GetCorporationsCorporationIdStarbasesStarbaseIdOk`. 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?(:'allow_alliance_members') self.allow_alliance_members = attributes[:'allow_alliance_members'] end if attributes.key?(:'allow_corporation_members') self.allow_corporation_members = attributes[:'allow_corporation_members'] end if attributes.key?(:'anchor') self.anchor = attributes[:'anchor'] end if attributes.key?(:'attack_if_at_war') self.attack_if_at_war = attributes[:'attack_if_at_war'] end if attributes.key?(:'attack_if_other_security_status_dropping') self.attack_if_other_security_status_dropping = attributes[:'attack_if_other_security_status_dropping'] end if attributes.key?(:'attack_security_status_threshold') self.attack_security_status_threshold = attributes[:'attack_security_status_threshold'] end if attributes.key?(:'attack_standing_threshold') self.attack_standing_threshold = attributes[:'attack_standing_threshold'] end if attributes.key?(:'fuel_bay_take') self.fuel_bay_take = attributes[:'fuel_bay_take'] end if attributes.key?(:'fuel_bay_view') self.fuel_bay_view = attributes[:'fuel_bay_view'] end if attributes.key?(:'fuels') if (value = attributes[:'fuels']).is_a?(Array) self.fuels = value end end if attributes.key?(:'offline') self.offline = attributes[:'offline'] end if attributes.key?(:'online') self.online = attributes[:'online'] end if attributes.key?(:'unanchor') self.unanchor = attributes[:'unanchor'] end if attributes.key?(:'use_alliance_standings') self.use_alliance_standings = attributes[:'use_alliance_standings'] end end |
Instance Attribute Details
#allow_alliance_members ⇒ Object
allow_alliance_members boolean
18 19 20 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 18 def allow_alliance_members @allow_alliance_members end |
#allow_corporation_members ⇒ Object
allow_corporation_members boolean
21 22 23 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 21 def allow_corporation_members @allow_corporation_members end |
#anchor ⇒ Object
Who can anchor starbase (POS) and its structures
24 25 26 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 24 def anchor @anchor end |
#attack_if_at_war ⇒ Object
attack_if_at_war boolean
27 28 29 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 27 def attack_if_at_war @attack_if_at_war end |
#attack_if_other_security_status_dropping ⇒ Object
attack_if_other_security_status_dropping boolean
30 31 32 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 30 def attack_if_other_security_status_dropping @attack_if_other_security_status_dropping end |
#attack_security_status_threshold ⇒ Object
Starbase (POS) will attack if target’s security standing is lower than this value
33 34 35 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 33 def attack_security_status_threshold @attack_security_status_threshold end |
#attack_standing_threshold ⇒ Object
Starbase (POS) will attack if target’s standing is lower than this value
36 37 38 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 36 def attack_standing_threshold @attack_standing_threshold end |
#fuel_bay_take ⇒ Object
Who can take fuel blocks out of the starbase (POS)‘s fuel bay
39 40 41 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 39 def fuel_bay_take @fuel_bay_take end |
#fuel_bay_view ⇒ Object
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
42 43 44 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 42 def fuel_bay_view @fuel_bay_view end |
#fuels ⇒ Object
Fuel blocks and other things that will be consumed when operating a starbase (POS)
45 46 47 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 45 def fuels @fuels end |
#offline ⇒ Object
Who can offline starbase (POS) and its structures
48 49 50 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 48 def offline @offline end |
#online ⇒ Object
Who can online starbase (POS) and its structures
51 52 53 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 51 def online @online end |
#unanchor ⇒ Object
Who can unanchor starbase (POS) and its structures
54 55 56 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 54 def unanchor @unanchor end |
#use_alliance_standings ⇒ Object
True if the starbase (POS) is using alliance standings, otherwise using corporation’s
57 58 59 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 57 def use_alliance_standings @use_alliance_standings end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 82 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 |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
377 378 379 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 377 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
122 123 124 125 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 122 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 102 def self.openapi_types { :'allow_alliance_members' => :'Object', :'allow_corporation_members' => :'Object', :'anchor' => :'Object', :'attack_if_at_war' => :'Object', :'attack_if_other_security_status_dropping' => :'Object', :'attack_security_status_threshold' => :'Object', :'attack_standing_threshold' => :'Object', :'fuel_bay_take' => :'Object', :'fuel_bay_view' => :'Object', :'fuels' => :'Object', :'offline' => :'Object', :'online' => :'Object', :'unanchor' => :'Object', :'use_alliance_standings' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 343 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
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 407 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 ESI.const_get(type).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
476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 476 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
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 384 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if 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[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]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end |
#eql?(o) ⇒ Boolean
364 365 366 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 364 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
370 371 372 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 370 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_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 203 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 invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
452 453 454 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 452 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 458 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 |
#to_s ⇒ String
Returns the string representation of the object
446 447 448 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 446 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/ruby-esi/models/get_corporations_corporation_id_starbases_starbase_id_ok.rb', line 254 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('Object', ['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('Object', ['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('Object', ['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('Object', ['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('Object', ['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('Object', ['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? true end |