=begin #EVE Swagger Interface #An OpenAPI for EVE Online OpenAPI spec version: 0.7.6 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.0-SNAPSHOT =end require 'date' module ESIClient # industry object class GetCharactersCharacterIdStatsIndustry # hacking_successes integer attr_accessor :hacking_successes # jobs_cancelled integer attr_accessor :jobs_cancelled # jobs_completed_copy_blueprint integer attr_accessor :jobs_completed_copy_blueprint # jobs_completed_invention integer attr_accessor :jobs_completed_invention # jobs_completed_manufacture integer attr_accessor :jobs_completed_manufacture # jobs_completed_manufacture_asteroid integer attr_accessor :jobs_completed_manufacture_asteroid # jobs_completed_manufacture_asteroid_quantity integer attr_accessor :jobs_completed_manufacture_asteroid_quantity # jobs_completed_manufacture_charge integer attr_accessor :jobs_completed_manufacture_charge # jobs_completed_manufacture_charge_quantity integer attr_accessor :jobs_completed_manufacture_charge_quantity # jobs_completed_manufacture_commodity integer attr_accessor :jobs_completed_manufacture_commodity # jobs_completed_manufacture_commodity_quantity integer attr_accessor :jobs_completed_manufacture_commodity_quantity # jobs_completed_manufacture_deployable integer attr_accessor :jobs_completed_manufacture_deployable # jobs_completed_manufacture_deployable_quantity integer attr_accessor :jobs_completed_manufacture_deployable_quantity # jobs_completed_manufacture_drone integer attr_accessor :jobs_completed_manufacture_drone # jobs_completed_manufacture_drone_quantity integer attr_accessor :jobs_completed_manufacture_drone_quantity # jobs_completed_manufacture_implant integer attr_accessor :jobs_completed_manufacture_implant # jobs_completed_manufacture_implant_quantity integer attr_accessor :jobs_completed_manufacture_implant_quantity # jobs_completed_manufacture_module integer attr_accessor :jobs_completed_manufacture_module # jobs_completed_manufacture_module_quantity integer attr_accessor :jobs_completed_manufacture_module_quantity # jobs_completed_manufacture_other integer attr_accessor :jobs_completed_manufacture_other # jobs_completed_manufacture_other_quantity integer attr_accessor :jobs_completed_manufacture_other_quantity # jobs_completed_manufacture_ship integer attr_accessor :jobs_completed_manufacture_ship # jobs_completed_manufacture_ship_quantity integer attr_accessor :jobs_completed_manufacture_ship_quantity # jobs_completed_manufacture_structure integer attr_accessor :jobs_completed_manufacture_structure # jobs_completed_manufacture_structure_quantity integer attr_accessor :jobs_completed_manufacture_structure_quantity # jobs_completed_manufacture_subsystem integer attr_accessor :jobs_completed_manufacture_subsystem # jobs_completed_manufacture_subsystem_quantity integer attr_accessor :jobs_completed_manufacture_subsystem_quantity # jobs_completed_material_productivity integer attr_accessor :jobs_completed_material_productivity # jobs_completed_time_productivity integer attr_accessor :jobs_completed_time_productivity # jobs_started_copy_blueprint integer attr_accessor :jobs_started_copy_blueprint # jobs_started_invention integer attr_accessor :jobs_started_invention # jobs_started_manufacture integer attr_accessor :jobs_started_manufacture # jobs_started_material_productivity integer attr_accessor :jobs_started_material_productivity # jobs_started_time_productivity integer attr_accessor :jobs_started_time_productivity # reprocess_item integer attr_accessor :reprocess_item # reprocess_item_quantity integer attr_accessor :reprocess_item_quantity # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'hacking_successes' => :'hacking_successes', :'jobs_cancelled' => :'jobs_cancelled', :'jobs_completed_copy_blueprint' => :'jobs_completed_copy_blueprint', :'jobs_completed_invention' => :'jobs_completed_invention', :'jobs_completed_manufacture' => :'jobs_completed_manufacture', :'jobs_completed_manufacture_asteroid' => :'jobs_completed_manufacture_asteroid', :'jobs_completed_manufacture_asteroid_quantity' => :'jobs_completed_manufacture_asteroid_quantity', :'jobs_completed_manufacture_charge' => :'jobs_completed_manufacture_charge', :'jobs_completed_manufacture_charge_quantity' => :'jobs_completed_manufacture_charge_quantity', :'jobs_completed_manufacture_commodity' => :'jobs_completed_manufacture_commodity', :'jobs_completed_manufacture_commodity_quantity' => :'jobs_completed_manufacture_commodity_quantity', :'jobs_completed_manufacture_deployable' => :'jobs_completed_manufacture_deployable', :'jobs_completed_manufacture_deployable_quantity' => :'jobs_completed_manufacture_deployable_quantity', :'jobs_completed_manufacture_drone' => :'jobs_completed_manufacture_drone', :'jobs_completed_manufacture_drone_quantity' => :'jobs_completed_manufacture_drone_quantity', :'jobs_completed_manufacture_implant' => :'jobs_completed_manufacture_implant', :'jobs_completed_manufacture_implant_quantity' => :'jobs_completed_manufacture_implant_quantity', :'jobs_completed_manufacture_module' => :'jobs_completed_manufacture_module', :'jobs_completed_manufacture_module_quantity' => :'jobs_completed_manufacture_module_quantity', :'jobs_completed_manufacture_other' => :'jobs_completed_manufacture_other', :'jobs_completed_manufacture_other_quantity' => :'jobs_completed_manufacture_other_quantity', :'jobs_completed_manufacture_ship' => :'jobs_completed_manufacture_ship', :'jobs_completed_manufacture_ship_quantity' => :'jobs_completed_manufacture_ship_quantity', :'jobs_completed_manufacture_structure' => :'jobs_completed_manufacture_structure', :'jobs_completed_manufacture_structure_quantity' => :'jobs_completed_manufacture_structure_quantity', :'jobs_completed_manufacture_subsystem' => :'jobs_completed_manufacture_subsystem', :'jobs_completed_manufacture_subsystem_quantity' => :'jobs_completed_manufacture_subsystem_quantity', :'jobs_completed_material_productivity' => :'jobs_completed_material_productivity', :'jobs_completed_time_productivity' => :'jobs_completed_time_productivity', :'jobs_started_copy_blueprint' => :'jobs_started_copy_blueprint', :'jobs_started_invention' => :'jobs_started_invention', :'jobs_started_manufacture' => :'jobs_started_manufacture', :'jobs_started_material_productivity' => :'jobs_started_material_productivity', :'jobs_started_time_productivity' => :'jobs_started_time_productivity', :'reprocess_item' => :'reprocess_item', :'reprocess_item_quantity' => :'reprocess_item_quantity' } end # Attribute type mapping. def self.swagger_types { :'hacking_successes' => :'Integer', :'jobs_cancelled' => :'Integer', :'jobs_completed_copy_blueprint' => :'Integer', :'jobs_completed_invention' => :'Integer', :'jobs_completed_manufacture' => :'Integer', :'jobs_completed_manufacture_asteroid' => :'Integer', :'jobs_completed_manufacture_asteroid_quantity' => :'Integer', :'jobs_completed_manufacture_charge' => :'Integer', :'jobs_completed_manufacture_charge_quantity' => :'Integer', :'jobs_completed_manufacture_commodity' => :'Integer', :'jobs_completed_manufacture_commodity_quantity' => :'Integer', :'jobs_completed_manufacture_deployable' => :'Integer', :'jobs_completed_manufacture_deployable_quantity' => :'Integer', :'jobs_completed_manufacture_drone' => :'Integer', :'jobs_completed_manufacture_drone_quantity' => :'Integer', :'jobs_completed_manufacture_implant' => :'Integer', :'jobs_completed_manufacture_implant_quantity' => :'Integer', :'jobs_completed_manufacture_module' => :'Integer', :'jobs_completed_manufacture_module_quantity' => :'Integer', :'jobs_completed_manufacture_other' => :'Integer', :'jobs_completed_manufacture_other_quantity' => :'Integer', :'jobs_completed_manufacture_ship' => :'Integer', :'jobs_completed_manufacture_ship_quantity' => :'Integer', :'jobs_completed_manufacture_structure' => :'Integer', :'jobs_completed_manufacture_structure_quantity' => :'Integer', :'jobs_completed_manufacture_subsystem' => :'Integer', :'jobs_completed_manufacture_subsystem_quantity' => :'Integer', :'jobs_completed_material_productivity' => :'Integer', :'jobs_completed_time_productivity' => :'Integer', :'jobs_started_copy_blueprint' => :'Integer', :'jobs_started_invention' => :'Integer', :'jobs_started_manufacture' => :'Integer', :'jobs_started_material_productivity' => :'Integer', :'jobs_started_time_productivity' => :'Integer', :'reprocess_item' => :'Integer', :'reprocess_item_quantity' => :'Integer' } end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash 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?(:'hacking_successes') self.hacking_successes = attributes[:'hacking_successes'] end if attributes.has_key?(:'jobs_cancelled') self.jobs_cancelled = attributes[:'jobs_cancelled'] end if attributes.has_key?(:'jobs_completed_copy_blueprint') self.jobs_completed_copy_blueprint = attributes[:'jobs_completed_copy_blueprint'] end if attributes.has_key?(:'jobs_completed_invention') self.jobs_completed_invention = attributes[:'jobs_completed_invention'] end if attributes.has_key?(:'jobs_completed_manufacture') self.jobs_completed_manufacture = attributes[:'jobs_completed_manufacture'] end if attributes.has_key?(:'jobs_completed_manufacture_asteroid') self.jobs_completed_manufacture_asteroid = attributes[:'jobs_completed_manufacture_asteroid'] end if attributes.has_key?(:'jobs_completed_manufacture_asteroid_quantity') self.jobs_completed_manufacture_asteroid_quantity = attributes[:'jobs_completed_manufacture_asteroid_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_charge') self.jobs_completed_manufacture_charge = attributes[:'jobs_completed_manufacture_charge'] end if attributes.has_key?(:'jobs_completed_manufacture_charge_quantity') self.jobs_completed_manufacture_charge_quantity = attributes[:'jobs_completed_manufacture_charge_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_commodity') self.jobs_completed_manufacture_commodity = attributes[:'jobs_completed_manufacture_commodity'] end if attributes.has_key?(:'jobs_completed_manufacture_commodity_quantity') self.jobs_completed_manufacture_commodity_quantity = attributes[:'jobs_completed_manufacture_commodity_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_deployable') self.jobs_completed_manufacture_deployable = attributes[:'jobs_completed_manufacture_deployable'] end if attributes.has_key?(:'jobs_completed_manufacture_deployable_quantity') self.jobs_completed_manufacture_deployable_quantity = attributes[:'jobs_completed_manufacture_deployable_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_drone') self.jobs_completed_manufacture_drone = attributes[:'jobs_completed_manufacture_drone'] end if attributes.has_key?(:'jobs_completed_manufacture_drone_quantity') self.jobs_completed_manufacture_drone_quantity = attributes[:'jobs_completed_manufacture_drone_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_implant') self.jobs_completed_manufacture_implant = attributes[:'jobs_completed_manufacture_implant'] end if attributes.has_key?(:'jobs_completed_manufacture_implant_quantity') self.jobs_completed_manufacture_implant_quantity = attributes[:'jobs_completed_manufacture_implant_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_module') self.jobs_completed_manufacture_module = attributes[:'jobs_completed_manufacture_module'] end if attributes.has_key?(:'jobs_completed_manufacture_module_quantity') self.jobs_completed_manufacture_module_quantity = attributes[:'jobs_completed_manufacture_module_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_other') self.jobs_completed_manufacture_other = attributes[:'jobs_completed_manufacture_other'] end if attributes.has_key?(:'jobs_completed_manufacture_other_quantity') self.jobs_completed_manufacture_other_quantity = attributes[:'jobs_completed_manufacture_other_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_ship') self.jobs_completed_manufacture_ship = attributes[:'jobs_completed_manufacture_ship'] end if attributes.has_key?(:'jobs_completed_manufacture_ship_quantity') self.jobs_completed_manufacture_ship_quantity = attributes[:'jobs_completed_manufacture_ship_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_structure') self.jobs_completed_manufacture_structure = attributes[:'jobs_completed_manufacture_structure'] end if attributes.has_key?(:'jobs_completed_manufacture_structure_quantity') self.jobs_completed_manufacture_structure_quantity = attributes[:'jobs_completed_manufacture_structure_quantity'] end if attributes.has_key?(:'jobs_completed_manufacture_subsystem') self.jobs_completed_manufacture_subsystem = attributes[:'jobs_completed_manufacture_subsystem'] end if attributes.has_key?(:'jobs_completed_manufacture_subsystem_quantity') self.jobs_completed_manufacture_subsystem_quantity = attributes[:'jobs_completed_manufacture_subsystem_quantity'] end if attributes.has_key?(:'jobs_completed_material_productivity') self.jobs_completed_material_productivity = attributes[:'jobs_completed_material_productivity'] end if attributes.has_key?(:'jobs_completed_time_productivity') self.jobs_completed_time_productivity = attributes[:'jobs_completed_time_productivity'] end if attributes.has_key?(:'jobs_started_copy_blueprint') self.jobs_started_copy_blueprint = attributes[:'jobs_started_copy_blueprint'] end if attributes.has_key?(:'jobs_started_invention') self.jobs_started_invention = attributes[:'jobs_started_invention'] end if attributes.has_key?(:'jobs_started_manufacture') self.jobs_started_manufacture = attributes[:'jobs_started_manufacture'] end if attributes.has_key?(:'jobs_started_material_productivity') self.jobs_started_material_productivity = attributes[:'jobs_started_material_productivity'] end if attributes.has_key?(:'jobs_started_time_productivity') self.jobs_started_time_productivity = attributes[:'jobs_started_time_productivity'] end if attributes.has_key?(:'reprocess_item') self.reprocess_item = attributes[:'reprocess_item'] end if attributes.has_key?(:'reprocess_item_quantity') self.reprocess_item_quantity = attributes[:'reprocess_item_quantity'] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && hacking_successes == o.hacking_successes && jobs_cancelled == o.jobs_cancelled && jobs_completed_copy_blueprint == o.jobs_completed_copy_blueprint && jobs_completed_invention == o.jobs_completed_invention && jobs_completed_manufacture == o.jobs_completed_manufacture && jobs_completed_manufacture_asteroid == o.jobs_completed_manufacture_asteroid && jobs_completed_manufacture_asteroid_quantity == o.jobs_completed_manufacture_asteroid_quantity && jobs_completed_manufacture_charge == o.jobs_completed_manufacture_charge && jobs_completed_manufacture_charge_quantity == o.jobs_completed_manufacture_charge_quantity && jobs_completed_manufacture_commodity == o.jobs_completed_manufacture_commodity && jobs_completed_manufacture_commodity_quantity == o.jobs_completed_manufacture_commodity_quantity && jobs_completed_manufacture_deployable == o.jobs_completed_manufacture_deployable && jobs_completed_manufacture_deployable_quantity == o.jobs_completed_manufacture_deployable_quantity && jobs_completed_manufacture_drone == o.jobs_completed_manufacture_drone && jobs_completed_manufacture_drone_quantity == o.jobs_completed_manufacture_drone_quantity && jobs_completed_manufacture_implant == o.jobs_completed_manufacture_implant && jobs_completed_manufacture_implant_quantity == o.jobs_completed_manufacture_implant_quantity && jobs_completed_manufacture_module == o.jobs_completed_manufacture_module && jobs_completed_manufacture_module_quantity == o.jobs_completed_manufacture_module_quantity && jobs_completed_manufacture_other == o.jobs_completed_manufacture_other && jobs_completed_manufacture_other_quantity == o.jobs_completed_manufacture_other_quantity && jobs_completed_manufacture_ship == o.jobs_completed_manufacture_ship && jobs_completed_manufacture_ship_quantity == o.jobs_completed_manufacture_ship_quantity && jobs_completed_manufacture_structure == o.jobs_completed_manufacture_structure && jobs_completed_manufacture_structure_quantity == o.jobs_completed_manufacture_structure_quantity && jobs_completed_manufacture_subsystem == o.jobs_completed_manufacture_subsystem && jobs_completed_manufacture_subsystem_quantity == o.jobs_completed_manufacture_subsystem_quantity && jobs_completed_material_productivity == o.jobs_completed_material_productivity && jobs_completed_time_productivity == o.jobs_completed_time_productivity && jobs_started_copy_blueprint == o.jobs_started_copy_blueprint && jobs_started_invention == o.jobs_started_invention && jobs_started_manufacture == o.jobs_started_manufacture && jobs_started_material_productivity == o.jobs_started_material_productivity && jobs_started_time_productivity == o.jobs_started_time_productivity && reprocess_item == o.reprocess_item && reprocess_item_quantity == o.reprocess_item_quantity end # @see the `==` method # @param [Object] Object to be compared def eql?(o) self == o end # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash [hacking_successes, jobs_cancelled, jobs_completed_copy_blueprint, jobs_completed_invention, jobs_completed_manufacture, jobs_completed_manufacture_asteroid, jobs_completed_manufacture_asteroid_quantity, jobs_completed_manufacture_charge, jobs_completed_manufacture_charge_quantity, jobs_completed_manufacture_commodity, jobs_completed_manufacture_commodity_quantity, jobs_completed_manufacture_deployable, jobs_completed_manufacture_deployable_quantity, jobs_completed_manufacture_drone, jobs_completed_manufacture_drone_quantity, jobs_completed_manufacture_implant, jobs_completed_manufacture_implant_quantity, jobs_completed_manufacture_module, jobs_completed_manufacture_module_quantity, jobs_completed_manufacture_other, jobs_completed_manufacture_other_quantity, jobs_completed_manufacture_ship, jobs_completed_manufacture_ship_quantity, jobs_completed_manufacture_structure, jobs_completed_manufacture_structure_quantity, jobs_completed_manufacture_subsystem, jobs_completed_manufacture_subsystem_quantity, jobs_completed_material_productivity, jobs_completed_time_productivity, jobs_started_copy_blueprint, jobs_started_invention, jobs_started_manufacture, jobs_started_material_productivity, jobs_started_time_productivity, reprocess_item, reprocess_item_quantity].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself 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 # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data 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<(?.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?.+?), (?.+)>\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 # Returns the string representation of the object # @return [String] String presentation of the object def to_s to_hash.to_s end # to_body is an alias to to_hash (backward compatibility) # @return [Hash] Returns the object in the form of hash def to_body to_hash end # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash 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 # Outputs non-array value in the form of hash # For object, use to_hash. Otherwise, just return the value # @param [Object] value Any valid value # @return [Hash] Returns the value in the form of hash 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 end end