package carupdatestatus

const (
	ManifestReceived            = "manifest_received"
	ManifestAccepted            = "manifest_accepted"
	ManifestRejected            = "manifest_rejected"
	ManifestCancelPending       = "manifest_cancel_pending"
	ManifestCancelReceived      = "manifest_cancel_received"
	ManifestCancelAccepted      = "manifest_cancel_accepted"
	ManifestCancelRejected      = "manifest_cancel_rejected"
	ManifestValidationSucceeded = "manifest_validation_succeeded"
	ManifestValidationFailed    = "manifest_validation_failed"
	DownloadStarted             = "download_started"
	Downloading                 = "downloading"
	DownloadCompleted           = "download_completed"
	DownloadFailed              = "download_failed"
	InstallApprovalAwait        = "install_approval_await"
	InstallApprovalReceived     = "install_approval_received"
	InstallStarted              = "install_started"
	Installing                  = "installing"
	InstallSucceeded            = "install_succeeded"
	InstallFailed               = "install_failed"
	RollbackStarted             = "rollback_started"
	RollbackSucceeded           = "rollback_succeeded"
	RollbackFailed              = "rollback_failed"
	CleanupSucceeded            = "cleanup_succeeded"
	CleanupFailed               = "cleanup_failed"
	ManifestError               = "manifest_error"
	ManifestRollback            = "manifest_rollback"
	ManifestSucceeded           = "manifest_succeeded"
	ManifestCanceled            = "manifest_canceled"
	ManifestPending             = "manifest_pending"
	Pending                     = "pending"
	Sent                        = "sent"
	RequirementsFailed          = "requirements_failed"
	RequirementsAwait           = "requirements_await"
	InstallScheduled            = "install_scheduled"
	InitialFlashPack            = "initial_flashpack_install"
)

// These final update statuses are ones that we will want to filter out
var FINAL_UPDATE_STATUS = []string{
	ManifestSucceeded,
	ManifestCanceled,
	ManifestError,
	DownloadFailed,
	ManifestCancelPending,
	RollbackSucceeded,
	ManifestRejected,
	RollbackFailed,
	CleanupSucceeded,
}

var NoRepeatUpdateStatus = map[string]struct{}{}

func init() {
	for _, status := range FINAL_UPDATE_STATUS {
		NoRepeatUpdateStatus[status] = struct{}{}
	}
}
