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
}
GetDrive will get a Drive instance from the service.
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)
}