{-# LANGUAGE DeriveGeneric #-}
module Battlesnake.Core.Battlesnake where
import Battlesnake.Core.Coordinate (Coordinate)
import Battlesnake.Core.Customizations (Customizations)
import Data.Aeson (FromJSON, ToJSON)
import Data.Text
import GHC.Generics
data Battlesnake = Battlesnake
{ Battlesnake -> Text
id :: Text
, Battlesnake -> Text
name :: Text
, Battlesnake -> Integer
health :: Integer
, Battlesnake -> [Coordinate]
body :: [Coordinate]
, Battlesnake -> Text
latency :: Text
, Battlesnake -> Coordinate
head :: Coordinate
, Battlesnake -> Integer
length :: Integer
, Battlesnake -> Text
shout :: Text
, Battlesnake -> Maybe Text
squad :: Maybe Text
, Battlesnake -> Customizations
customizations :: Customizations
}
deriving (Int -> Battlesnake -> ShowS
[Battlesnake] -> ShowS
Battlesnake -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Battlesnake] -> ShowS
$cshowList :: [Battlesnake] -> ShowS
show :: Battlesnake -> String
$cshow :: Battlesnake -> String
showsPrec :: Int -> Battlesnake -> ShowS
$cshowsPrec :: Int -> Battlesnake -> ShowS
Show, forall x. Rep Battlesnake x -> Battlesnake
forall x. Battlesnake -> Rep Battlesnake x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Battlesnake x -> Battlesnake
$cfrom :: forall x. Battlesnake -> Rep Battlesnake x
Generic)
instance ToJSON Battlesnake
instance FromJSON Battlesnake