package protocol import "encoding/json" // ValuePayload holds a complete value for reports, telemetry, or commands. // Value is required. JSON null is a present value. Capability-specific value // validation belongs to the driver or entity, not to the wire layer. type ValuePayload struct { Value json.RawMessage `json:"value"` } // AvailabilityPayload holds reachability. Status is online or offline. type AvailabilityPayload struct { Status string `json:"status"` } // EventPayload is an application-defined occurrence object. Every key is event // data, not an optional wire field. Empty objects are valid. Button and camera // actions can use action and occurred_at without a closed field list. type EventPayload map[string]json.RawMessage // ResultPayload holds accepted, completed, rejected, or failed. Only rejected // and failed require a nonempty Reason. Other statuses must omit Reason. type ResultPayload struct { Status string `json:"status"` Reason string `json:"reason,omitempty"` }