{-# LANGUAGE TemplateHaskell #-}

-- | <http://strava.github.io/api/v3/comments/>
module Strive.Types.Comments
  ( CommentSummary (..),
  )
where

import Data.Aeson.TH (deriveFromJSON)
import Data.Text (Text)
import Data.Time.Clock (UTCTime)
import Strive.Enums (ResourceState)
import Strive.Internal.TH (options)
import Strive.Types.Athletes (AthleteSummary)

-- | <http://strava.github.io/api/v3/comments/#summary-and-detailed-representation-attributes>
data CommentSummary = CommentSummary
  { CommentSummary -> Integer
commentSummary_activityId :: Integer,
    CommentSummary -> AthleteSummary
commentSummary_athlete :: AthleteSummary,
    CommentSummary -> UTCTime
commentSummary_createdAt :: UTCTime,
    CommentSummary -> Integer
commentSummary_id :: Integer,
    CommentSummary -> ResourceState
commentSummary_resourceState :: ResourceState,
    CommentSummary -> Text
commentSummary_text :: Text
  }
  deriving (Int -> CommentSummary -> ShowS
[CommentSummary] -> ShowS
CommentSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CommentSummary] -> ShowS
$cshowList :: [CommentSummary] -> ShowS
show :: CommentSummary -> String
$cshow :: CommentSummary -> String
showsPrec :: Int -> CommentSummary -> ShowS
$cshowsPrec :: Int -> CommentSummary -> ShowS
Show)

$(deriveFromJSON options ''CommentSummary)