{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
module Telegram.Bot.API.Methods.EditMessageLiveLocation where
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Proxy
import Data.Text
import GHC.Generics (Generic)
import Servant.API
import Servant.Client hiding (Response)
import Telegram.Bot.API.Internal.Utils
import Telegram.Bot.API.MakingRequests
import Telegram.Bot.API.Types
data EditMessageLiveLocationRequest = EditMessageLiveLocationRequest
{ EditMessageLiveLocationRequest -> Maybe SomeChatId
editMessageLiveLocationChatId :: Maybe SomeChatId
, EditMessageLiveLocationRequest -> Maybe MessageId
editMessageLiveLocationMessageId :: Maybe MessageId
, EditMessageLiveLocationRequest -> Maybe Text
editMessageLiveLocationInlineMessageId :: Maybe Text
, EditMessageLiveLocationRequest -> Float
editMessageLiveLocationLatitude :: Float
, EditMessageLiveLocationRequest -> Float
editMessageLiveLocationLongitude :: Float
, EditMessageLiveLocationRequest -> Maybe Float
editMessageLiveLocationHorizontalAccuracy :: Maybe Float
, EditMessageLiveLocationRequest -> Maybe Int
editMessageLiveLocationHeading :: Maybe Int
, EditMessageLiveLocationRequest -> Maybe Int
editMessageLiveLocationProximityAlertRadius :: Maybe Int
, EditMessageLiveLocationRequest -> Maybe InlineKeyboardMarkup
editMessageLiveLocationReplyMarkup :: Maybe InlineKeyboardMarkup
}
deriving forall x.
Rep EditMessageLiveLocationRequest x
-> EditMessageLiveLocationRequest
forall x.
EditMessageLiveLocationRequest
-> Rep EditMessageLiveLocationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EditMessageLiveLocationRequest x
-> EditMessageLiveLocationRequest
$cfrom :: forall x.
EditMessageLiveLocationRequest
-> Rep EditMessageLiveLocationRequest x
Generic
instance ToJSON EditMessageLiveLocationRequest where toJSON :: EditMessageLiveLocationRequest -> 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 EditMessageLiveLocationRequest where parseJSON :: Value -> Parser EditMessageLiveLocationRequest
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON
type EditMessageLiveLocation = "editMessageLiveLocation"
:> ReqBody '[JSON] EditMessageLiveLocationRequest
:> Post '[JSON] (Response (Either Bool Message))
editMessageLiveLocation :: EditMessageLiveLocationRequest -> ClientM (Response (Either Bool Message))
editMessageLiveLocation :: EditMessageLiveLocationRequest
-> ClientM (Response (Either Bool Message))
editMessageLiveLocation = forall api.
HasClient ClientM api =>
Proxy api -> Client ClientM api
client (forall {k} (t :: k). Proxy t
Proxy @EditMessageLiveLocation)