|
|
@ -5,6 +5,7 @@ import ( |
|
|
|
"git.aiterp.net/lucifer3/server/device" |
|
|
|
"git.aiterp.net/lucifer3/server/effects" |
|
|
|
"git.aiterp.net/lucifer3/server/events" |
|
|
|
"git.aiterp.net/lucifer3/server/internal/color" |
|
|
|
"github.com/google/uuid" |
|
|
|
) |
|
|
|
|
|
|
@ -29,17 +30,19 @@ func (e Patch) EventDescription() string { |
|
|
|
} |
|
|
|
|
|
|
|
type DevicePatch struct { |
|
|
|
ID string `json:"id,omitempty"` |
|
|
|
Name *string `json:"name,omitempty"` |
|
|
|
HWMetadata *events.HardwareMetadata `json:"hwMetadata,omitempty"` |
|
|
|
HWState *events.HardwareState `json:"hwState,omitempty"` |
|
|
|
DesiredState *device.State `json:"desiredState,omitempty"` |
|
|
|
SetAliases []string `json:"setAliases,omitempty"` |
|
|
|
AddAlias *string `json:"addAlias,omitempty"` |
|
|
|
RemoveAlias *string `json:"removeAlias,omitempty"` |
|
|
|
Assignment *uuid.UUID `json:"assignment,omitempty"` |
|
|
|
ClearAssignment bool `json:"clearAssignment,omitempty"` |
|
|
|
Delete bool `json:"delete,omitempty"` |
|
|
|
ID string `json:"id,omitempty"` |
|
|
|
Name *string `json:"name,omitempty"` |
|
|
|
HWMetadata *events.HardwareMetadata `json:"hwMetadata,omitempty"` |
|
|
|
HWState *events.HardwareState `json:"hwState,omitempty"` |
|
|
|
DesiredState *device.State `json:"desiredState,omitempty"` |
|
|
|
SetAliases []string `json:"setAliases,omitempty"` |
|
|
|
AddAlias *string `json:"addAlias,omitempty"` |
|
|
|
RemoveAlias *string `json:"removeAlias,omitempty"` |
|
|
|
Assignment *uuid.UUID `json:"assignment,omitempty"` |
|
|
|
ClearAssignment bool `json:"clearAssignment,omitempty"` |
|
|
|
ActiveColorRGB *color.RGB `json:"activeColorRgb"` |
|
|
|
ClearActiveColorRGB bool `json:"clearActiveColorRGB"` |
|
|
|
Delete bool `json:"delete,omitempty"` |
|
|
|
} |
|
|
|
|
|
|
|
type AssignmentPatch struct { |
|
|
|