{-# LANGUAGE DataKinds #-}{-# LANGUAGE DeriveGeneric #-}{-# LANGUAGE TypeApplications #-}{-# LANGUAGE TypeOperators #-}module Telegram.Bot.API.Methods.GetMyName whereimport Data.Aeson (FromJSON (..), ToJSON (..))import Data.Proxyimport GHC.Generics (Generic)import Data.Text (Text)import Servant.APIimport Servant.Client hiding (Response)import Telegram.Bot.API.Internal.Utilsimport Telegram.Bot.API.MakingRequestsimport Telegram.Bot.API.Typesimport Telegram.Bot.API.Internal.TH-- ** 'GetMyName'newtype GetMyNameRequest = GetMyNameRequest { getMyNameLanguageCode :: Maybe Text -- ^ A two-letter ISO 639-1 language code or an empty string. } deriving Genericinstance ToJSON GetMyNameRequest where toJSON = gtoJSONinstance FromJSON GetMyNameRequest where parseJSON = gparseJSONtype GetMyName = "getMyName" :> ReqBody '[JSON] GetMyNameRequest :> Post '[JSON] (Response BotName)-- | Use this method to get the current bot name for the given user language.-- Returns 'BotName' on success.getMyName :: GetMyNameRequest -> ClientM (Response BotName)getMyName = client (Proxy @GetMyName)makeDefault ''GetMyNameRequest