func (capacitysource *CapacitySource) ProvidingPools() ([]*StoragePool, error) {
	return ListReferencedStoragePools(capacitysource.Client, capacitysource.providingPools)
}
TODO: Add memory chunks
ProvidingPools gets contributing pools.
package swordfish
import (
	"encoding/json"
	"github.com/stmcginnis/gofish/redfish"
	"github.com/stmcginnis/gofish/common"
)
type Capacity struct {
	Data CapacityInfo
	IsThinProvisioned bool
	Metadata CapacityInfo
	Snapshot CapacityInfo
}
type CapacityInfo struct {
	AllocatedBytes int64
	ConsumedBytes int64
	GuaranteedBytes int64
	ProvisionedBytes int64
}
type CapacitySource struct {
	common.Entity
	ODataContext string `json:"@odata.context"`
	ODataType string `json:"@odata.type"`
	Description string
	ProvidedCapacity Capacity
	providedClassOfService string
	providingDrives string
	providingMemory string
	providingMemoryChunks string
	providingPools string
	providingVolumes string
}
func (capacitysource *CapacitySource) UnmarshalJSON(b []byte) error {
	type temp CapacitySource
	var t struct {
		temp
		ProvidedClassOfService common.Link
		ProvidingDrives        common.Link
		ProvidingMemory        common.Link
		ProvidingMemoryChunks  common.Link
		ProvidingPools         common.Link
		ProvidingVolumes       common.Link
	}
	err := json.Unmarshal(b, &t)
	if err != nil {
		return err
	}
	*capacitysource = CapacitySource(t.temp)
	capacitysource.providedClassOfService = string(t.ProvidedClassOfService)
	capacitysource.providingDrives = string(t.ProvidingDrives)
	capacitysource.providingMemory = string(t.ProvidingMemory)
	capacitysource.providingMemoryChunks = string(t.ProvidingMemoryChunks)
	capacitysource.providingPools = string(t.ProvidingPools)
	capacitysource.providingVolumes = string(t.ProvidingVolumes)
	return nil
}
func GetCapacitySource(c common.Client, uri string) (*CapacitySource, error) {
	resp, err := c.Get(uri)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	var capacitysource CapacitySource
	err = json.NewDecoder(resp.Body).Decode(&capacitysource)
	if err != nil {
		return nil, err
	}
	capacitysource.SetClient(c)
	return &capacitysource, nil
}
func ListReferencedCapacitySources(c common.Client, link string) ([]*CapacitySource, error) {
	var result []*CapacitySource
	if link == "" {
		return result, nil
	}
	links, err := common.GetCollection(c, link)
	if err != nil {
		return result, err
	}
	for _, capSourceLink := range links.ItemLinks {
		capSource, err := GetCapacitySource(c, capSourceLink)
		if err != nil {
			return result, err
		}
		result = append(result, capSource)
	}
	return result, nil
}
func (capacitysource *CapacitySource) ProvidedClassOfService() (*ClassOfService, error) {
	if capacitysource.providedClassOfService == "" {
		return nil, nil
	}
	return GetClassOfService(capacitysource.Client, capacitysource.providedClassOfService)
}
func (capacitysource *CapacitySource) ProvidingDrives() ([]*redfish.Drive, error) {
	return redfish.ListReferencedDrives(capacitysource.Client, capacitysource.providingDrives)
}
func (capacitysource *CapacitySource) ProvidingMemory() ([]*redfish.Memory, error) {
	return redfish.ListReferencedMemorys(capacitysource.Client, capacitysource.providingMemory)
}