// Copyright 2023 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package species

func Find(id string) *Species {
	for _, v := range species {
		if v.SpeciesID == id {
			other := v
			return &other
		}
	}
	return nil
}

type Species struct {
	SpeciesID       string
	Name            string
	Classification  string
	Designation     string
	AverageHeight   uint64
	AverageLifespan uint64
	Homeworld       string
	Language        string
	// Relationships
	PersonIDs []string
	FilmIDs   []string
}

var species = []Species{
	{
		SpeciesID:       "1",
		Name:            "Human",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 120,
		Homeworld:       "9",
		Language:        "Galactic Basic",
		FilmIDs:         []string{"1", "2", "3", "4", "5", "6"},
		PersonIDs:       []string{"66", "67", "68", "74"},
	},
	{
		SpeciesID:       "2",
		Name:            "Droid",
		Classification:  "artificial",
		Designation:     "sentient",
		AverageHeight:   0,
		AverageLifespan: 0,
		Homeworld:       "",
		Language:        "n/a",
		FilmIDs:         []string{"1", "2", "3", "4", "5", "6"},
		PersonIDs:       []string{"2", "3", "8", "23"},
	},
	{
		SpeciesID:       "3",
		Name:            "Wookie",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   210,
		AverageLifespan: 400,
		Homeworld:       "14",
		Language:        "Shyriiwook",
		FilmIDs:         []string{"1", "2", "3", "6"},
		PersonIDs:       []string{"13", "80"},
	},
	{
		SpeciesID:       "4",
		Name:            "Rodian",
		Classification:  "sentient",
		Designation:     "reptilian",
		AverageHeight:   170,
		AverageLifespan: 0,
		Homeworld:       "23",
		Language:        "Galatic Basic",
		FilmIDs:         []string{"1"},
		PersonIDs:       []string{"15"},
	},
	{
		SpeciesID:       "5",
		Name:            "Hutt",
		Classification:  "gastropod",
		Designation:     "sentient",
		AverageHeight:   300,
		AverageLifespan: 1000,
		Homeworld:       "24",
		Language:        "Huttese",
		FilmIDs:         []string{"1", "3"},
		PersonIDs:       []string{"16"},
	},
	{
		SpeciesID:       "6",
		Name:            "Yoda's species",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   66,
		AverageLifespan: 900,
		Homeworld:       "28",
		Language:        "Galactic basic",
		FilmIDs:         []string{"2", "3", "4", "5", "6"},
		PersonIDs:       []string{"20"},
	},
	{
		SpeciesID:       "7",
		Name:            "Trandoshan",
		Classification:  "reptile",
		Designation:     "sentient",
		AverageHeight:   200,
		AverageLifespan: 0,
		Homeworld:       "29",
		Language:        "Dosh",
		FilmIDs:         []string{"2"},
		PersonIDs:       []string{"24"},
	},
	{
		SpeciesID:       "8",
		Name:            "Mon Calamari",
		Classification:  "amphibian",
		Designation:     "sentient",
		AverageHeight:   160,
		AverageLifespan: 0,
		Homeworld:       "31",
		Language:        "Mon Calamarian",
		FilmIDs:         []string{"3"},
		PersonIDs:       []string{"27"},
	},
	{
		SpeciesID:       "9",
		Name:            "Ewok",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   100,
		AverageLifespan: 0,
		Homeworld:       "7",
		Language:        "Ewokese",
		FilmIDs:         []string{"3"},
		PersonIDs:       []string{"30"},
	},
	{
		SpeciesID:       "10",
		Name:            "Sullustan",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 0,
		Homeworld:       "33",
		Language:        "Sullutese",
		FilmIDs:         []string{"3"},
		PersonIDs:       []string{"31"},
	},
	{
		SpeciesID:       "11",
		Name:            "Neimodian",
		Classification:  "unknown",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 0,
		Homeworld:       "18",
		Language:        "Neimoidia",
		FilmIDs:         []string{"4"},
		PersonIDs:       []string{"33"},
	},
	{
		SpeciesID:       "12",
		Name:            "Gungan",
		Classification:  "amphibian",
		Designation:     "sentient",
		AverageHeight:   190,
		AverageLifespan: 0,
		Homeworld:       "8",
		Language:        "Gungan basic",
		FilmIDs:         []string{"4", "5"},
		PersonIDs:       []string{"36", "37", "38"},
	},
	{
		SpeciesID:       "13",
		Name:            "Toydarian",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   120,
		AverageLifespan: 91,
		Homeworld:       "34",
		Language:        "Toydarian",
		FilmIDs:         []string{"4", "5"},
		PersonIDs:       []string{"40"},
	},
	{
		SpeciesID:       "14",
		Name:            "Dug",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   100,
		AverageLifespan: 0,
		Homeworld:       "35",
		Language:        "Dugese",
		FilmIDs:         []string{"4"},
		PersonIDs:       []string{"41"},
	},
	{
		SpeciesID:       "15",
		Name:            "Twi'lek",
		Classification:  "mammals",
		Designation:     "sentient",
		AverageHeight:   200,
		AverageLifespan: 0,
		Homeworld:       "37",
		Language:        "Twi'leki",
		FilmIDs:         []string{"3", "4", "5", "6"},
		PersonIDs:       []string{"45", "46"},
	},
	{
		SpeciesID:       "16",
		Name:            "Aleena",
		Classification:  "reptile",
		Designation:     "sentient",
		AverageHeight:   80,
		AverageLifespan: 79,
		Homeworld:       "38",
		Language:        "Aleena",
		FilmIDs:         []string{"4"},
		PersonIDs:       []string{"47"},
	},
	{
		SpeciesID:       "17",
		Name:            "Vulptereen",
		Classification:  "unknown",
		Designation:     "sentient",
		AverageHeight:   100,
		AverageLifespan: 0,
		Homeworld:       "39",
		Language:        "vulpterish",
		FilmIDs:         []string{"4"},
		PersonIDs:       []string{"48"},
	},
	{
		SpeciesID:       "18",
		Name:            "Xexto",
		Classification:  "unknown",
		Designation:     "sentient",
		AverageHeight:   125,
		AverageLifespan: 0,
		Homeworld:       "40",
		Language:        "Xextese",
		FilmIDs:         []string{"4"},
		PersonIDs:       []string{"49"},
	},
	{
		SpeciesID:       "19",
		Name:            "Toong",
		Classification:  "unknown",
		Designation:     "sentient",
		AverageHeight:   200,
		AverageLifespan: 0,
		Homeworld:       "41",
		Language:        "Tundan",
		FilmIDs:         []string{"4", "6"},
		PersonIDs:       []string{"50"},
	},
	{
		SpeciesID:       "20",
		Name:            "Cerean",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   200,
		AverageLifespan: 0,
		Homeworld:       "43",
		Language:        "Cerean",
		FilmIDs:         []string{"4", "6"},
		PersonIDs:       []string{"52"},
	},
	{
		SpeciesID:       "21",
		Name:            "Nautolan",
		Classification:  "amphibian",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 70,
		Homeworld:       "44",
		Language:        "Nautila",
		FilmIDs:         []string{"4"},
		PersonIDs:       []string{"53"},
	},
	{
		SpeciesID:       "22",
		Name:            "Zabrak",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 0,
		Homeworld:       "45",
		Language:        "Zabraki",
		FilmIDs:         []string{"4"},
		PersonIDs:       []string{"44", "54"},
	},
	{
		SpeciesID:       "23",
		Name:            "Tholothian",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   0,
		AverageLifespan: 0,
		Homeworld:       "46",
		Language:        "unknown",
		FilmIDs:         []string{"4", "6"},
		PersonIDs:       []string{"55"},
	},
	{
		SpeciesID:       "24",
		Name:            "Iktotchi",
		Classification:  "unknown",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 0,
		Homeworld:       "47",
		Language:        "Iktotchese",
		FilmIDs:         []string{"4", "6"},
		PersonIDs:       []string{"56"},
	},
	{
		SpeciesID:       "25",
		Name:            "Quermian",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   240,
		AverageLifespan: 86,
		Homeworld:       "48",
		Language:        "Quermian",
		FilmIDs:         []string{"4", "6"},
		PersonIDs:       []string{"57"},
	},
	{
		SpeciesID:       "26",
		Name:            "Kel Dor",
		Classification:  "unknown",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 70,
		Homeworld:       "49",
		Language:        "Kel Dor",
		FilmIDs:         []string{"4", "6"},
		PersonIDs:       []string{"58"},
	},
	{
		SpeciesID:       "27",
		Name:            "Chagrian",
		Classification:  "amphibian",
		Designation:     "sentient",
		AverageHeight:   190,
		AverageLifespan: 0,
		Homeworld:       "50",
		Language:        "Chagria",
		FilmIDs:         []string{"4", "6"},
		PersonIDs:       []string{"59"},
	},
	{
		SpeciesID:       "28",
		Name:            "Geonosian",
		Classification:  "insectoid",
		Designation:     "sentient",
		AverageHeight:   178,
		AverageLifespan: 0,
		Homeworld:       "11",
		Language:        "Geonosian",
		FilmIDs:         []string{"5", "6"},
		PersonIDs:       []string{"63"},
	},
	{
		SpeciesID:       "29",
		Name:            "Mirialan",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 0,
		Homeworld:       "51",
		Language:        "Mirialan",
		FilmIDs:         []string{"5", "6"},
		PersonIDs:       []string{"64", "65"},
	},
	{
		SpeciesID:       "30",
		Name:            "Clawdite",
		Classification:  "reptilian",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 70,
		Homeworld:       "54",
		Language:        "Clawdite",
		FilmIDs:         []string{"5", "6"},
		PersonIDs:       []string{"70"},
	},
	{
		SpeciesID:       "31",
		Name:            "Besalisk",
		Classification:  "amphibian",
		Designation:     "sentient",
		AverageHeight:   178,
		AverageLifespan: 75,
		Homeworld:       "55",
		Language:        "besalisk",
		FilmIDs:         []string{"5"},
		PersonIDs:       []string{"71"},
	},
	{
		SpeciesID:       "32",
		Name:            "Kaminoan",
		Classification:  "amphibian",
		Designation:     "sentient",
		AverageHeight:   220,
		AverageLifespan: 80,
		Homeworld:       "10",
		Language:        "Kaminoan",
		FilmIDs:         []string{"5"},
		PersonIDs:       []string{"72", "73"},
	},
	{
		SpeciesID:       "33",
		Name:            "Skakoan",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   0,
		AverageLifespan: 0,
		Homeworld:       "56",
		Language:        "Skakoan",
		FilmIDs:         []string{"5", "6"},
		PersonIDs:       []string{"76"},
	},
	{
		SpeciesID:       "34",
		Name:            "Muun",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   190,
		AverageLifespan: 100,
		Homeworld:       "57",
		Language:        "Muun",
		FilmIDs:         []string{"5", "6"},
		PersonIDs:       []string{"77"},
	},
	{
		SpeciesID:       "35",
		Name:            "Togruta",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   180,
		AverageLifespan: 94,
		Homeworld:       "58",
		Language:        "Togruti",
		FilmIDs:         []string{"5", "6"},
		PersonIDs:       []string{"78"},
	},
	{
		SpeciesID:       "36",
		Name:            "Kaleesh",
		Classification:  "reptile",
		Designation:     "sentient",
		AverageHeight:   170,
		AverageLifespan: 80,
		Homeworld:       "59",
		Language:        "Kaleesh",
		FilmIDs:         []string{"6"},
		PersonIDs:       []string{"79"},
	},
	{
		SpeciesID:       "37",
		Name:            "Pau'an",
		Classification:  "mammal",
		Designation:     "sentient",
		AverageHeight:   190,
		AverageLifespan: 700,
		Homeworld:       "12",
		Language:        "Utapese",
		FilmIDs:         []string{"6"},
		PersonIDs:       []string{"83"},
	},
}
