func (drive *Drive) PCIeFunctions() ([]*PCIeFunction, error) {
	var result []*PCIeFunction
	collectionError := common.NewCollectionError()
	for _, pcieFunctionLink := range drive.pcieFunctions {
		pcieFunction, err := GetPCIeFunction(drive.Client, pcieFunctionLink)
		if err != nil {
			collectionError.Failures[pcieFunctionLink] = err
		} else {
			result = append(result, pcieFunction)
		}
	}
	if collectionError.Empty() {
		return result, nil
	}
	return result, collectionError
}
PCIeFunctions references the PCIeFunctions that this drive is associated with.
package redfish
import (
	"encoding/json"
	"reflect"
	"github.com/stmcginnis/gofish/common"
)
type EncryptionAbility string
const (
	NoneEncryptionAbility EncryptionAbility = "None"
	SelfEncryptingDriveEncryptionAbility EncryptionAbility = "SelfEncryptingDrive"
	OtherEncryptionAbility EncryptionAbility = "Other"
)
type EncryptionStatus string
const (
	UnecryptedEncryptionStatus EncryptionStatus = "Unecrypted"
	UnlockedEncryptionStatus EncryptionStatus = "Unlocked"
	LockedEncryptionStatus EncryptionStatus = "Locked"
	ForeignEncryptionStatus EncryptionStatus = "Foreign"
	UnencryptedEncryptionStatus EncryptionStatus = "Unencrypted"
)
type HotspareReplacementModeType string
const (
	RevertibleHotspareReplacementModeType HotspareReplacementModeType = "Revertible"
	NonRevertibleHotspareReplacementModeType HotspareReplacementModeType = "NonRevertible"
)
type HotspareType string
const (
	NoneHotspareType HotspareType = "None"
	GlobalHotspareType HotspareType = "Global"
	ChassisHotspareType HotspareType = "Chassis"
	DedicatedHotspareType HotspareType = "Dedicated"
)
type MediaType string
const (
	HDDMediaType MediaType = "HDD"
	SSDMediaType MediaType = "SSD"
	SMRMediaType MediaType = "SMR"
)
type StatusIndicator string
const (
	OKStatusIndicator StatusIndicator = "OK"
	FailStatusIndicator StatusIndicator = "Fail"
	RebuildStatusIndicator StatusIndicator = "Rebuild"
	PredictiveFailureAnalysisStatusIndicator StatusIndicator = "PredictiveFailureAnalysis"
	HotspareStatusIndicator StatusIndicator = "Hotspare"
	InACriticalArrayStatusIndicator StatusIndicator = "InACriticalArray"
	InAFailedArrayStatusIndicator StatusIndicator = "InAFailedArray"
)
type Drive struct {
	common.Entity
	ODataContext string `json:"@odata.context"`
	ODataType string `json:"@odata.type"`
	assembly string
	AssetTag string
	BlockSizeBytes int
	CapableSpeedGbs float32
	CapacityBytes int64
	Description string
	EncryptionAbility EncryptionAbility
	EncryptionStatus EncryptionStatus
	FailurePredicted bool
	HotspareReplacementMode HotspareReplacementModeType
	HotspareType HotspareType
	Identifiers []common.Identifier
	IndicatorLED common.IndicatorLED
	Location []common.Location
	Manufacturer string
	MediaType MediaType
	Model string
	Multipath bool
	NegotiatedSpeedGbs float32
	Operations []common.Operations
	PartNumber string
	PhysicalLocation common.Location
	PredictedMediaLifeLeftPercent float32
	Protocol common.Protocol
	Revision string
	RotationSpeedRPM float32
	SKU string
	SerialNumber string
	Status common.Status
	StatusIndicator StatusIndicator
	WriteCacheEnabled bool
	chassis string
	endpoints []string
	EndpointsCount int `json:"Endpoints@odata.count"`
	volumes []string
	VolumesCount int
	pcieFunctions []string
	PCIeFunctionCount int
	StoragePoolsCount int
	secureEraseTarget string
	rawData []byte
}
func (drive *Drive) UnmarshalJSON(b []byte) error {
	type temp Drive
	type links struct {
		Chassis       common.Link
		Endpoints     common.Links
		EndpointCount int `json:"Endpoints@odata.count"`
		PCIeFunctions common.Links
		PCIeFunctionsCount int `json:"PCIeFunctions@odata.count"`
		StoragePools       common.Links
		StoragePoolsCount  int `json:"StoragePools@odata.count"`
		Volumes            common.Links
		VolumeCount        int `json:"Volumes@odata.count"`
	}
	type Actions struct {
		SecureErase struct {
			Target string
		} `json:"#Drive.SecureErase"`
	}
	var t struct {
		temp
		Links    links
		Actions  Actions
		Assembly common.Link
	}
	err := json.Unmarshal(b, &t)
	if err != nil {
		return err
	}
	*drive = Drive(t.temp)
	drive.assembly = string(t.Assembly)
	drive.chassis = string(t.Links.Chassis)
	drive.endpoints = t.Links.Endpoints.ToStrings()
	drive.EndpointsCount = t.Links.EndpointCount
	drive.volumes = t.Links.Volumes.ToStrings()
	drive.VolumesCount = t.Links.VolumeCount
	drive.pcieFunctions = t.Links.PCIeFunctions.ToStrings()
	drive.PCIeFunctionCount = t.Links.PCIeFunctionsCount
	drive.secureEraseTarget = t.Actions.SecureErase.Target
	drive.rawData = b
	return nil
}
func (drive *Drive) Update() error {
	original := new(Drive)
	err := original.UnmarshalJSON(drive.rawData)
	if err != nil {
		return err
	}
	readWriteFields := []string{
		"AssetTag",
		"HotspareReplacementMode",
		"IndicatorLED",
		"StatusIndicator",
		"WriteCacheEnabled",
	}
	originalElement := reflect.ValueOf(original).Elem()
	currentElement := reflect.ValueOf(drive).Elem()
	return drive.Entity.Update(originalElement, currentElement, readWriteFields)
}
func GetDrive(c common.Client, uri string) (*Drive, error) {
	resp, err := c.Get(uri)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	var drive Drive
	err = json.NewDecoder(resp.Body).Decode(&drive)
	if err != nil {
		return nil, err
	}
	drive.SetClient(c)
	return &drive, nil
}
func ListReferencedDrives(c common.Client, link string) ([]*Drive, error) {  
	var result []*Drive
	if link == "" {
		return result, nil
	}
	links, err := common.GetCollection(c, link)
	if err != nil {
		return result, err
	}
	collectionError := common.NewCollectionError()
	for _, driveLink := range links.ItemLinks {
		drive, err := GetDrive(c, driveLink)
		if err != nil {
			collectionError.Failures[driveLink] = err
		} else {
			result = append(result, drive)
		}
	}
	if collectionError.Empty() {
		return result, nil
	}
	return result, collectionError
}
func (drive *Drive) Assembly() (*Assembly, error) {
	if drive.assembly == "" {
		return nil, nil
	}
	return GetAssembly(drive.Client, drive.assembly)
}
func (drive *Drive) Chassis() (*Chassis, error) {
	if drive.chassis == "" {
		return nil, nil
	}
	return GetChassis(drive.Client, drive.chassis)
}
func (drive *Drive) Endpoints() ([]*Endpoint, error) {
	var result []*Endpoint
	collectionError := common.NewCollectionError()
	for _, endpointLink := range drive.endpoints {
		endpoint, err := GetEndpoint(drive.Client, endpointLink)
		if err != nil {
			collectionError.Failures[endpointLink] = err
		} else {
			result = append(result, endpoint)
		}
	}
	if collectionError.Empty() {
		return result, nil
	}
	return result, collectionError
}
func (drive *Drive) Volumes() ([]*Volume, error) {
	var result []*Volume
	collectionError := common.NewCollectionError()
	for _, volumeLink := range drive.volumes {
		volume, err := GetVolume(drive.Client, volumeLink)
		if err != nil {
			collectionError.Failures[volumeLink] = err
		} else {
			result = append(result, volume)
		}
	}
	if collectionError.Empty() {
		return result, nil
	}
	return result, collectionError
}