"""
Star Wars Character Information
Retrive information about Star Wars characters.
"""
name = "starwars/character-information"
version = "1.0.4"

"""
Retrieve Character Info
Retrieve information about a Star Wars character.
"""
usecase RetrieveCharacterInformation safe {
  input {
    characterName
  }

  result {
    height
    weight
    yearOfBirth
  }

  error {
    message
    characters
  }

  example success {
    input {
      characterName = 'Luke Skywalker'
    }

    result {
      height = "172",
      weight = "77",
      yearOfBirth = "19BBY",
    }
  }

  example errorNoMatch {
    input {
      characterName = "madeUp"
    }

    error {
      message = "No character found"
    }
  }

  example errorWithSuggestions {
    input {
      characterName = "Luke"
    }

    error {
      message = "Specified character name is incorrect, did you mean to enter one of following?"
      characters = ["Luke Skywalker"]
    }
  }
}

"
Character name 
The character name to use when looking up character information
"
field characterName string

"
Height
The height of the character
"
field height string

"
Weight
The weight of the character
"
field weight string

"
Year of birth
The year of birth of the character
"
field yearOfBirth string

"
Message
The message for when an error occurs looking up character information
"
field message string

"
Characters
List of characters which might correspond to entered character name.
"
field characters [string]