{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}

module Web.OpenWeatherMap.Types.City
  ( City(..)
  ) where

import GHC.Generics (Generic)

import Data.Aeson (FromJSON)

import Web.OpenWeatherMap.Types.Coord (Coord)

data City =
  City
    { City -> String
name :: String
    , City -> Maybe String
country :: Maybe String
    , City -> Coord
coord :: Coord
    , City -> Int
timezone :: Int
    , City -> Int
sunset :: Int
    , City -> Int
sunrise :: Int
    }
  deriving (Int -> City -> ShowS
[City] -> ShowS
City -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [City] -> ShowS
$cshowList :: [City] -> ShowS
show :: City -> String
$cshow :: City -> String
showsPrec :: Int -> City -> ShowS
$cshowsPrec :: Int -> City -> ShowS
Show, forall x. Rep City x -> City
forall x. City -> Rep City x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep City x -> City
$cfrom :: forall x. City -> Rep City x
Generic, Value -> Parser [City]
Value -> Parser City
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [City]
$cparseJSONList :: Value -> Parser [City]
parseJSON :: Value -> Parser City
$cparseJSON :: Value -> Parser City
FromJSON)