package event

var (
	ClusterMaintenanceEventTypeTaskCreate      EventType = "create_task"
	ClusterMaintenanceEventTypeTaskRun         EventType = "run_task"
	ClusterMaintenanceEventTypeTaskClose       EventType = "close_task"
	ClusterMaintenanceEventTypeExecutionStart  EventType = "start_execution"
	ClusterMaintenanceEventTypeExecutionFinish EventType = "finish_execution"
	ClusterMaintenanceEventTypeExecutionCancel EventType = "cancel_execution"
)

type ClusterMaintenanceEventExecution struct {
	ExecutionID uint64 `json:"execution_id,omitempty"`
}

type ClusterMaintenanceEventDetail struct {
	InstanceID      uint64                            `json:"instance_id,omitempty"`
	StartExecution  *ClusterMaintenanceEventExecution `json:"start_execution,omitempty"`
	FinishExecution *ClusterMaintenanceEventExecution `json:"finish_execution,omitempty"`
	CancelExecution *ClusterMaintenanceEventExecution `json:"cancel_execution,omitempty"`
}

type ClusterMaintenanceEvent struct {
	BaseEvent `json:",inline"`

	Details ClusterMaintenanceEventDetail `json:"details"`
}
