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

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

import GHC.Generics (Generic)

import Data.Aeson (FromJSON)

import Web.OpenWeatherMap.Types.City (City)
import Web.OpenWeatherMap.Types.Forecast (Forecast)

-- | Response to requests for forecast weather.
-- Refer to <https://openweathermap.org/forecast5>.
data ForecastWeather =
  ForecastWeather
    { ForecastWeather -> [Forecast]
list :: [Forecast]
    , ForecastWeather -> City
city :: City
    }
  deriving (Int -> ForecastWeather -> ShowS
[ForecastWeather] -> ShowS
ForecastWeather -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ForecastWeather] -> ShowS
$cshowList :: [ForecastWeather] -> ShowS
show :: ForecastWeather -> String
$cshow :: ForecastWeather -> String
showsPrec :: Int -> ForecastWeather -> ShowS
$cshowsPrec :: Int -> ForecastWeather -> ShowS
Show, forall x. Rep ForecastWeather x -> ForecastWeather
forall x. ForecastWeather -> Rep ForecastWeather x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ForecastWeather x -> ForecastWeather
$cfrom :: forall x. ForecastWeather -> Rep ForecastWeather x
Generic, Value -> Parser [ForecastWeather]
Value -> Parser ForecastWeather
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [ForecastWeather]
$cparseJSONList :: Value -> Parser [ForecastWeather]
parseJSON :: Value -> Parser ForecastWeather
$cparseJSON :: Value -> Parser ForecastWeather
FromJSON)