func (pr LocalPackageReference) Equals(ref PackageReference) bool {
	if ref == nil {
		return false
	}
	if other, ok := ref.AsLocalPackage(); ok {
		return pr.localPathPrefix == other.localPathPrefix &&
			pr.version == other.version &&
			pr.group == other.group
	}
	return false
}
Equals returns true if the passed package reference references the same package, false otherwise
package astmodel
import (
	"fmt"
	"strings"
	"unicode"
)
type LocalPackageReference struct {
	localPathPrefix string
	group           string
	version         string
}
var _ PackageReference = LocalPackageReference{}
var _ fmt.Stringer = LocalPackageReference{}
const generatorVersionPrefix string = "v1alpha1api"
func MakeLocalPackageReference(prefix string, group string, version string) LocalPackageReference {
	return LocalPackageReference{
		localPathPrefix: prefix,
		group:           group,
		version:         version,
	}
}
func CreateLocalPackageNameFromVersion(version string) string {
	return generatorVersionPrefix + sanitizePackageName(version)
}
func sanitizePackageName(input string) string {
	var builder []rune = make([]rune, 0, len(input))
	for _, r := range input {
		if unicode.IsLetter(r) || unicode.IsNumber(r) {
			builder = append(builder, unicode.ToLower(rune(r)))
		}
	}
	return string(builder)
}
func (pr LocalPackageReference) AsLocalPackage() (LocalPackageReference, bool) {
	return pr, true
}
func (pr LocalPackageReference) Group() string {
	return pr.group
}
func (pr LocalPackageReference) Version() string {
	return pr.version
}
func (pr LocalPackageReference) PackageName() string {
	return pr.version
}
func (pr LocalPackageReference) PackagePath() string {
	url := pr.localPathPrefix + "/" + pr.group + "/" + pr.version
	return url
}