Skip to content

Commit da13cef

Browse files
smiller248bbrown-cw
authored andcommitted
Add RawData to PowerSubsystem type (stmcginnis#461)
1 parent f7557a2 commit da13cef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

redfish/powersubsystem.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ type PowerSubsystem struct {
4646
PowerSupplyRedundancy []RedundantGroup
4747
// Status shall contain any status or health properties of the resource.
4848
Status common.Status
49+
// RawData holds the original serialized JSON.
50+
RawData []byte
4951
}
5052

5153
// UnmarshalJSON unmarshals a PowerSubsystem object from the raw JSON.
@@ -83,6 +85,8 @@ func (powersubsystem *PowerSubsystem) UnmarshalJSON(b []byte) error {
8385
powersubsystem.batteries = t.Batteries.String()
8486
powersubsystem.powerSupplies = t.PowerSupplies.String()
8587

88+
powersubsystem.RawData = b
89+
8690
return nil
8791
}
8892

0 commit comments

Comments
 (0)