Convert object to hash
 @return [Hash] the hash describing this object
326058
def to_h
      {
        id: id,
        metadata: metadata_config,
        login: login_config,
        job: job_config,
        custom: custom_config,
        acls: acls_config,
        batch_connect:  batch_connect_config
      }
    end
848593
def to_hash
      attributes.inject({}) do |hash, (key, value)|
        unless Resource::Base.has_attribute?(key)
          hash[Util.camelize(key, true)] = send(key.to_sym)
        end

        hash
      end
    end
7012
def to_hash
      hash = {}

      hash['scale'] = "#{scale}x" unless scale.nil?

      (KNOWN_KEYS - [:scale]).each do |key|
        value = self.send(key)
        hash[key.to_s.dasherize] = value.to_s unless value.nil?
      end

      attributes.each do |key, value|
        hash[key.to_s] = value
      end

      hash
    end
1314617
def to_hash
      config = { database: database, hosts: hosts }
      if username && password
        config.merge!(username: username, password: password)
      end
      config
    end
990704
def to_hash
            index_hash = Hash.new
            index_hash["json_claz"] = self.class.name
            index_hash["id"] = id
            index_hash["provider_id"] = provider_id
            index_hash["account_id"] = account_id
            index_hash["provider_name"] = provider_name
            index_hash["options"] = options
            index_hash["created_at"] = created_at
            index_hash
        end
148083
def to_hash
      result = @response

      # All JSON magic responses are an array with one item
      result = result.first

      # All JSON magic results contain one key on their object named
      # actioninfo
      result = result.values.first

      # The data in a JSON magic result is always an array. If that array
      # only has a single item, then just return that as the result. This is
      # a compromise as some actions that should always return arrays
      # (i.e. GetProviders) may return a single hash.
      if result.count == 1
        result = result.first
      end

      result = convert_dates_to_utc(result)
      Utilities::recursively_symbolize_keys(result)
    end
127684
def to_hash
      result = {}

      @values.each_key do |field_name|
        field = _protobuf_message_field[field_name]
        field.to_message_hash(@values, result)
      end

      result
    end
801734
def to_hash(options = {})
      options.reverse_merge!(@_options)

      data = root_object

      options[:root_name] = determine_object_root(data, root_name, options[:root])

      result =
        if is_object?(data) || !data # object @user
          Builder.new(data, @_settings, options).to_hash
        elsif is_collection?(data) # collection @users
          MultiBuilder.new(data, @_settings, options).to_a
        end

      result = escape_output(result) if Rabl.configuration.escape_all_output

      result
    end
1204580
def to_hash
            index_hash = Hash.new
            index_hash["json_claz"] = self.class.name
            index_hash["id"] = id
            index_hash["org_id"] = org_id
            index_hash["name"] = name
            index_hash["accounts_id"] = accounts_id
            index_hash["inputs"] = inputs
            index_hash["assemblies"] = assemblies
            index_hash["created_at"] = created_at
            index_hash["some_msg"] = some_msg
            index_hash
        end
725201
def to_hash
      {}.merge(@properties).tap do |h|
        h['_links'] = {}.merge @links    unless @links.empty?

        combined_embedded = {}
        combined_embedded.merge! @embedded unless @embedded.empty?
        combined_embedded.merge! @embedded_arrays unless @embedded_arrays.empty?
        h['_embedded'] = combined_embedded unless combined_embedded.empty?
      end
    end
664583
def to_hash
      result = {}

      @values.keys.each do |field_name|
        value = __send__(field_name)
        hashed_value = value.respond_to?(:to_hash_value) ? value.to_hash_value : value
        result.merge!(field_name => hashed_value)
      end

      result
    end
428685
def to_hash
      ret = {}
      @hash.dup.each_pair do |key, val|
        ret[key] = self.convert_value_from_ostruct(val)
      end
      ret
    end
496785
def to_hash
      keys = table_header_keys
      values = self
      hash = {}
      keys.each_with_index {|k,i| hash[k]=values[i]}
      return hash
    end
410143
def to_hash
            index_hash = {}
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id
            index_hash["account_id"] = account_id
            index_hash['name'] = name
            index_hash['allowed'] = allowed
            index_hash['allocated_to'] = allocated_to
            index_hash['quota_type'] = quota_type
            index_hash['status'] = status
            index_hash['inputs'] = inputs
            index_hash['created_at'] = created_at
            index_hash['updated_at'] = updated_at
            index_hash
        end
814683
def to_hash
      @relations.each_with_object({}) do |(rel,val), obj|
        rel = rel.to_s

        hashed_val = val.map(&:to_hash)
        if val.length == 1 && !single_item_arrays?
          hashed_val = val.first.to_hash
        end

        obj[rel] = hashed_val
      end
    end
457234
def to_hash
            index_hash = {}
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id
            index_hash["asms_id"] = asms_id
            index_hash['name'] = name
            index_hash['components'] = components
            index_hash['tosca_type'] = tosca_type
            index_hash['policies'] = policies
            index_hash['inputs'] = inputs
            index_hash['outputs'] = outputs
            index_hash['status'] = status
            index_hash['state'] = state
            index_hash['created_at'] = created_at
            index_hash
        end
124743
def to_hash
      _new_hash= {}
      each do |key, value|
        _new_hash[convert_key(key)] = convert_value(value, for: :to_hash)
      end
      Hash.new(default).merge!(_new_hash)
    end