package v1

import "k8s.io/apimachinery/pkg/types"

func (r *Restore) GetClusterRef() types.NamespacedName {
	return types.NamespacedName{
		Namespace: r.Namespace,
		Name:      r.Spec.ClusterName,
	}
}

func (r *Restore) GetRegion() string {
	return r.Labels[RegionLabel]
}

func (r *Restore) IsFinished() bool {
	return r.Status.Phase == RestoreComplete || r.Status.Phase == RestoreFailed || r.Status.Phase == RestoreInvalid
}
