package spdxlicenses

// Code generated by go-spdx cmd/license.go. DO NOT EDIT.
// Source: https://github.com/spdx/license-list-data specifies official SPDX license list.

import "strings"

// IsDeprecatedLicense does a case-insensitive lookup for the license id in the deprecated licenses map.
// It returns true and the case-sensitive ID if found, otherwise false and the original id.
func IsDeprecatedLicense(id string) (bool, string) {
	foundID, ok := deprecatedMap[strings.ToUpper(id)]
	if ok {
		return true, foundID
	}
	return false, id
}

// GetDeprecatedMap returns a map of deprecated license IDs keyed by uppercase ID.
func GetDeprecatedMap() map[string]string {
	copied := make(map[string]string, len(deprecatedMap))
	for k, v := range deprecatedMap {
		copied[k] = v
	}
	return copied
}

// GetDeprecated returns a slice of deprecated license IDs.
func GetDeprecated() []string {
	return []string{
		"AGPL-1.0",
		"AGPL-3.0",
		"BSD-2-Clause-FreeBSD",
		"BSD-2-Clause-NetBSD",
		"bzip2-1.0.5",
		"eCos-2.0",
		"GFDL-1.1",
		"GFDL-1.2",
		"GFDL-1.3",
		"GPL-1.0",
		"GPL-1.0+",
		"GPL-2.0",
		"GPL-2.0+",
		"GPL-2.0-with-autoconf-exception",
		"GPL-2.0-with-bison-exception",
		"GPL-2.0-with-classpath-exception",
		"GPL-2.0-with-font-exception",
		"GPL-2.0-with-GCC-exception",
		"GPL-3.0",
		"GPL-3.0+",
		"GPL-3.0-with-autoconf-exception",
		"GPL-3.0-with-GCC-exception",
		"LGPL-2.0",
		"LGPL-2.0+",
		"LGPL-2.1",
		"LGPL-2.1+",
		"LGPL-3.0",
		"LGPL-3.0+",
		"Net-SNMP",
		"Nunit",
		"StandardML-NJ",
		"wxWindows",
	}
}

var deprecatedMap = map[string]string{
	"AGPL-1.0":                         "AGPL-1.0",
	"AGPL-3.0":                         "AGPL-3.0",
	"BSD-2-CLAUSE-FREEBSD":             "BSD-2-Clause-FreeBSD",
	"BSD-2-CLAUSE-NETBSD":              "BSD-2-Clause-NetBSD",
	"BZIP2-1.0.5":                      "bzip2-1.0.5",
	"ECOS-2.0":                         "eCos-2.0",
	"GFDL-1.1":                         "GFDL-1.1",
	"GFDL-1.2":                         "GFDL-1.2",
	"GFDL-1.3":                         "GFDL-1.3",
	"GPL-1.0":                          "GPL-1.0",
	"GPL-1.0+":                         "GPL-1.0+",
	"GPL-2.0":                          "GPL-2.0",
	"GPL-2.0+":                         "GPL-2.0+",
	"GPL-2.0-WITH-AUTOCONF-EXCEPTION":  "GPL-2.0-with-autoconf-exception",
	"GPL-2.0-WITH-BISON-EXCEPTION":     "GPL-2.0-with-bison-exception",
	"GPL-2.0-WITH-CLASSPATH-EXCEPTION": "GPL-2.0-with-classpath-exception",
	"GPL-2.0-WITH-FONT-EXCEPTION":      "GPL-2.0-with-font-exception",
	"GPL-2.0-WITH-GCC-EXCEPTION":       "GPL-2.0-with-GCC-exception",
	"GPL-3.0":                          "GPL-3.0",
	"GPL-3.0+":                         "GPL-3.0+",
	"GPL-3.0-WITH-AUTOCONF-EXCEPTION":  "GPL-3.0-with-autoconf-exception",
	"GPL-3.0-WITH-GCC-EXCEPTION":       "GPL-3.0-with-GCC-exception",
	"LGPL-2.0":                         "LGPL-2.0",
	"LGPL-2.0+":                        "LGPL-2.0+",
	"LGPL-2.1":                         "LGPL-2.1",
	"LGPL-2.1+":                        "LGPL-2.1+",
	"LGPL-3.0":                         "LGPL-3.0",
	"LGPL-3.0+":                        "LGPL-3.0+",
	"NET-SNMP":                         "Net-SNMP",
	"NUNIT":                            "Nunit",
	"STANDARDML-NJ":                    "StandardML-NJ",
	"WXWINDOWS":                        "wxWindows",
}
