func (chassis *Chassis) Power() (*Power, error) {
	if chassis.power == "" {
		return nil, nil
	}
	power, err := GetPower(chassis.Client, chassis.power)
	if err != nil {
		return nil, err
	}
	return power, nil
}
Power gets the power information for the chassis
package redfish
import (
	"encoding/json"
	"fmt"
	"reflect"
	"github.com/stmcginnis/gofish/common"
)
type ChassisType string
const (
	BladeChassisType ChassisType = "Blade"
	CardChassisType ChassisType = "Card"
	CartridgeChassisType ChassisType = "Cartridge"
	ComponentChassisType ChassisType = "Component"
	DrawerChassisType ChassisType = "Drawer"
	EnclosureChassisType ChassisType = "Enclosure"
	ExpansionChassisType ChassisType = "Expansion"
	IPBasedDriveChassisType ChassisType = "IPBasedDrive"
	ModuleChassisType ChassisType = "Module"
	OtherChassisType ChassisType = "Other"
	PodChassisType ChassisType = "Pod"
	RackChassisType ChassisType = "Rack"
	RackGroupChassisType ChassisType = "RackGroup"
	RackMountChassisType ChassisType = "RackMount"
	RowChassisType ChassisType = "Row"
	ShelfChassisType ChassisType = "Shelf"
	SidecarChassisType ChassisType = "Sidecar"
	SledChassisType ChassisType = "Sled"
	StandAloneChassisType ChassisType = "StandAlone"
	StorageEnclosureChassisType ChassisType = "StorageEnclosure"
	ZoneChassisType ChassisType = "Zone"
)
type EnvironmentalClass string
const (
	A1EnvironmentalClass EnvironmentalClass = "A1"
	A2EnvironmentalClass EnvironmentalClass = "A2"
	A3EnvironmentalClass EnvironmentalClass = "A3"
	A4EnvironmentalClass EnvironmentalClass = "A4"
)
type IntrusionSensor string
const (
	NormalIntrusionSensor IntrusionSensor = "Normal"
	HardwareIntrusionIntrusionSensor IntrusionSensor = "HardwareIntrusion"
	TamperingDetectedIntrusionSensor IntrusionSensor = "TamperingDetected"
)
type IntrusionSensorReArm string
const (
	ManualIntrusionSensorReArm IntrusionSensorReArm = "Manual"
	AutomaticIntrusionSensorReArm IntrusionSensorReArm = "Automatic"
)
type PhysicalSecurity struct {
	IntrusionSensor IntrusionSensor
	IntrusionSensorNumber int
	IntrusionSensorReArm IntrusionSensorReArm
}
type Chassis struct {
	common.Entity
	ODataContext string `json:"@odata.context"`
	ODataType string `json:"@odata.type"`
	AssetTag string
	ChassisType ChassisType
	DepthMm float64
	Description string
	linkedDrives []string
	drives string
	DrivesCount int `json:"Drives@odata.count"`
	EnvironmentalClass EnvironmentalClass
	HeightMm float64
	IndicatorLED common.IndicatorLED
	Location common.Location
	Manufacturer string
	Model string
	PartNumber string
	PhysicalSecurity PhysicalSecurity
	PowerState PowerState
	SKU string
	SerialNumber string
	Status common.Status
	UUID string
	WeightKg float64
	WidthMm         float64
	thermal         string
	power           string
	networkAdapters string
	computerSystems []string
	resourceBlocks  []string
	managedBy       []string
	resetTarget string
	SupportedResetTypes []ResetType
	rawData []byte
}
func (chassis *Chassis) UnmarshalJSON(b []byte) error {
	type temp Chassis
	type linkReference struct {
		ComputerSystems common.Links
		ResourceBlocks  common.Links
		ManagedBy       common.Links
		Drives          common.Links
		DrivesCount     int `json:"Drives@odata.count"`
	}
	type Actions struct {
		ChassisReset struct {
			AllowedResetTypes []ResetType `json:"ResetType@Redfish.AllowableValues"`
			Target            string
		} `json:"#Chassis.Reset"`
	}
	var t struct {
		temp
		Drives          common.Link
		Thermal         common.Link
		Power           common.Link
		NetworkAdapters common.Link
		Links           linkReference
		Actions         Actions
	}
	err := json.Unmarshal(b, &t)
	if err != nil {
		return err
	}
	*chassis = Chassis(t.temp)
	chassis.drives = string(t.Drives)
	chassis.linkedDrives = t.Links.Drives.ToStrings()
	if chassis.DrivesCount == 0 && t.Links.DrivesCount > 0 {
		chassis.DrivesCount = t.Links.DrivesCount
	}
	chassis.thermal = string(t.Thermal)
	chassis.power = string(t.Power)
	chassis.networkAdapters = string(t.NetworkAdapters)
	chassis.computerSystems = t.Links.ComputerSystems.ToStrings()
	chassis.resourceBlocks = t.Links.ResourceBlocks.ToStrings()
	chassis.managedBy = t.Links.ManagedBy.ToStrings()
	chassis.resetTarget = t.Actions.ChassisReset.Target
	chassis.SupportedResetTypes = t.Actions.ChassisReset.AllowedResetTypes
	chassis.rawData = b
	return nil
}
func (chassis *Chassis) Update() error {
	original := new(Chassis)
	err := original.UnmarshalJSON(chassis.rawData)
	if err != nil {
		return err
	}
	readWriteFields := []string{
		"AssetTag",
		"IndicatorLED",
	}
	originalElement := reflect.ValueOf(original).Elem()
	currentElement := reflect.ValueOf(chassis).Elem()
	return chassis.Entity.Update(originalElement, currentElement, readWriteFields)
}
func GetChassis(c common.Client, uri string) (*Chassis, error) {
	resp, err := c.Get(uri)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	var chassis Chassis
	err = json.NewDecoder(resp.Body).Decode(&chassis)
	if err != nil {
		return nil, err
	}
	chassis.SetClient(c)
	return &chassis, nil
}
func ListReferencedChassis(c common.Client, link string) ([]*Chassis, error) {
	var result []*Chassis
	links, err := common.GetCollection(c, link)
	if err != nil {
		return result, err
	}
	collectionError := common.NewCollectionError()
	for _, chassisLink := range links.ItemLinks {
		chassis, err := GetChassis(c, chassisLink)
		if err != nil {
			collectionError.Failures[chassisLink] = err
		} else {
			result = append(result, chassis)
		}
	}
	if collectionError.Empty() {
		return result, nil
	}
	return result, collectionError
}
func (chassis *Chassis) Drives() ([]*Drive, error) {
	var result []*Drive
	if chassis.drives == "" && len(chassis.linkedDrives) == 0 {
		return result, nil
	}
	driveLinks := chassis.linkedDrives
	if chassis.drives != "" {
		drives, err := common.GetCollection(chassis.Client, chassis.drives)
		if err != nil {
			return nil, err
		}
		driveLinks = drives.ItemLinks
	}
	collectionError := common.NewCollectionError()
	for _, driveLink := range driveLinks {
		drive, err := GetDrive(chassis.Client, driveLink)
		if err != nil {
			collectionError.Failures[driveLink] = err
		} else {
			result = append(result, drive)
		}
	}
	if collectionError.Empty() {
		return result, nil
	}
	return result, collectionError
}
func (chassis *Chassis) Thermal() (*Thermal, error) {
	if chassis.thermal == "" {
		return nil, nil
	}
	thermal, err := GetThermal(chassis.Client, chassis.thermal)
	if err != nil {
		return nil, err
	}
	return thermal, nil
}