{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.Venue where

import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import GHC.Generics (Generic)

import Telegram.Bot.API.Types.Location
import Telegram.Bot.API.Internal.Utils

-- ** 'Venue'

-- | This object represents a venue.
data Venue = Venue
  { Venue -> Location
venueLocation        :: Location   -- ^ Venue location.
  , Venue -> Text
venueTitle           :: Text       -- ^ Name of the venue.
  , Venue -> Text
venueAddress         :: Text       -- ^ Address of the venue.
  , Venue -> Maybe Text
venueFoursquareId    :: Maybe Text -- ^ Foursquare identifier of the venue.
  , Venue -> Maybe Text
venueFoursquareType  :: Maybe Text -- ^ Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
  , Venue -> Maybe Text
venueGooglePlaceId   :: Maybe Text -- ^ Google Places identifier of the venue.
  , Venue -> Maybe Text
venueGooglePlaceType :: Maybe Text -- ^ Google Places type of the venue. (See supported types.)
  }
  deriving (forall x. Rep Venue x -> Venue
forall x. Venue -> Rep Venue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Venue x -> Venue
$cfrom :: forall x. Venue -> Rep Venue x
Generic, Int -> Venue -> ShowS
[Venue] -> ShowS
Venue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Venue] -> ShowS
$cshowList :: [Venue] -> ShowS
show :: Venue -> String
$cshow :: Venue -> String
showsPrec :: Int -> Venue -> ShowS
$cshowsPrec :: Int -> Venue -> ShowS
Show)

instance ToJSON   Venue where toJSON :: Venue -> Value
toJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON Venue where parseJSON :: Value -> Parser Venue
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON