module TD.Query.EditBusinessMessageLiveLocation
(EditBusinessMessageLiveLocation(..)
, defaultEditBusinessMessageLiveLocation
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
import qualified TD.Data.ReplyMarkup as ReplyMarkup
import qualified TD.Data.Location as Location
data EditBusinessMessageLiveLocation
= EditBusinessMessageLiveLocation
{ EditBusinessMessageLiveLocation -> Maybe Text
business_connection_id :: Maybe T.Text
, EditBusinessMessageLiveLocation -> Maybe Int
chat_id :: Maybe Int
, EditBusinessMessageLiveLocation -> Maybe Int
message_id :: Maybe Int
, EditBusinessMessageLiveLocation -> Maybe ReplyMarkup
reply_markup :: Maybe ReplyMarkup.ReplyMarkup
, EditBusinessMessageLiveLocation -> Maybe Location
location :: Maybe Location.Location
, EditBusinessMessageLiveLocation -> Maybe Int
live_period :: Maybe Int
, EditBusinessMessageLiveLocation -> Maybe Int
heading :: Maybe Int
, EditBusinessMessageLiveLocation -> Maybe Int
proximity_alert_radius :: Maybe Int
}
deriving (EditBusinessMessageLiveLocation
-> EditBusinessMessageLiveLocation -> Bool
(EditBusinessMessageLiveLocation
-> EditBusinessMessageLiveLocation -> Bool)
-> (EditBusinessMessageLiveLocation
-> EditBusinessMessageLiveLocation -> Bool)
-> Eq EditBusinessMessageLiveLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EditBusinessMessageLiveLocation
-> EditBusinessMessageLiveLocation -> Bool
== :: EditBusinessMessageLiveLocation
-> EditBusinessMessageLiveLocation -> Bool
$c/= :: EditBusinessMessageLiveLocation
-> EditBusinessMessageLiveLocation -> Bool
/= :: EditBusinessMessageLiveLocation
-> EditBusinessMessageLiveLocation -> Bool
Eq, Int -> EditBusinessMessageLiveLocation -> ShowS
[EditBusinessMessageLiveLocation] -> ShowS
EditBusinessMessageLiveLocation -> String
(Int -> EditBusinessMessageLiveLocation -> ShowS)
-> (EditBusinessMessageLiveLocation -> String)
-> ([EditBusinessMessageLiveLocation] -> ShowS)
-> Show EditBusinessMessageLiveLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EditBusinessMessageLiveLocation -> ShowS
showsPrec :: Int -> EditBusinessMessageLiveLocation -> ShowS
$cshow :: EditBusinessMessageLiveLocation -> String
show :: EditBusinessMessageLiveLocation -> String
$cshowList :: [EditBusinessMessageLiveLocation] -> ShowS
showList :: [EditBusinessMessageLiveLocation] -> ShowS
Show)
instance I.ShortShow EditBusinessMessageLiveLocation where
shortShow :: EditBusinessMessageLiveLocation -> String
shortShow
EditBusinessMessageLiveLocation
{ business_connection_id :: EditBusinessMessageLiveLocation -> Maybe Text
business_connection_id = Maybe Text
business_connection_id_
, chat_id :: EditBusinessMessageLiveLocation -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: EditBusinessMessageLiveLocation -> Maybe Int
message_id = Maybe Int
message_id_
, reply_markup :: EditBusinessMessageLiveLocation -> Maybe ReplyMarkup
reply_markup = Maybe ReplyMarkup
reply_markup_
, location :: EditBusinessMessageLiveLocation -> Maybe Location
location = Maybe Location
location_
, live_period :: EditBusinessMessageLiveLocation -> Maybe Int
live_period = Maybe Int
live_period_
, heading :: EditBusinessMessageLiveLocation -> Maybe Int
heading = Maybe Int
heading_
, proximity_alert_radius :: EditBusinessMessageLiveLocation -> Maybe Int
proximity_alert_radius = Maybe Int
proximity_alert_radius_
}
= String
"EditBusinessMessageLiveLocation"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"business_connection_id" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
business_connection_id_
, String
"chat_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
chat_id_
, String
"message_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
message_id_
, String
"reply_markup" String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
, String
"location" String -> Maybe Location -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Location
location_
, String
"live_period" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
live_period_
, String
"heading" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
heading_
, String
"proximity_alert_radius" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
proximity_alert_radius_
]
instance AT.ToJSON EditBusinessMessageLiveLocation where
toJSON :: EditBusinessMessageLiveLocation -> Value
toJSON
EditBusinessMessageLiveLocation
{ business_connection_id :: EditBusinessMessageLiveLocation -> Maybe Text
business_connection_id = Maybe Text
business_connection_id_
, chat_id :: EditBusinessMessageLiveLocation -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: EditBusinessMessageLiveLocation -> Maybe Int
message_id = Maybe Int
message_id_
, reply_markup :: EditBusinessMessageLiveLocation -> Maybe ReplyMarkup
reply_markup = Maybe ReplyMarkup
reply_markup_
, location :: EditBusinessMessageLiveLocation -> Maybe Location
location = Maybe Location
location_
, live_period :: EditBusinessMessageLiveLocation -> Maybe Int
live_period = Maybe Int
live_period_
, heading :: EditBusinessMessageLiveLocation -> Maybe Int
heading = Maybe Int
heading_
, proximity_alert_radius :: EditBusinessMessageLiveLocation -> Maybe Int
proximity_alert_radius = Maybe Int
proximity_alert_radius_
}
= [Pair] -> Value
A.object
[ Key
"@type" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"editBusinessMessageLiveLocation"
, Key
"business_connection_id" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
business_connection_id_
, Key
"chat_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
chat_id_
, Key
"message_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
message_id_
, Key
"reply_markup" Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
, Key
"location" Key -> Maybe Location -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Location
location_
, Key
"live_period" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
live_period_
, Key
"heading" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
heading_
, Key
"proximity_alert_radius" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
proximity_alert_radius_
]
defaultEditBusinessMessageLiveLocation :: EditBusinessMessageLiveLocation
defaultEditBusinessMessageLiveLocation :: EditBusinessMessageLiveLocation
defaultEditBusinessMessageLiveLocation =
EditBusinessMessageLiveLocation
{ business_connection_id :: Maybe Text
business_connection_id = Maybe Text
forall a. Maybe a
Nothing
, chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, message_id :: Maybe Int
message_id = Maybe Int
forall a. Maybe a
Nothing
, reply_markup :: Maybe ReplyMarkup
reply_markup = Maybe ReplyMarkup
forall a. Maybe a
Nothing
, location :: Maybe Location
location = Maybe Location
forall a. Maybe a
Nothing
, live_period :: Maybe Int
live_period = Maybe Int
forall a. Maybe a
Nothing
, heading :: Maybe Int
heading = Maybe Int
forall a. Maybe a
Nothing
, proximity_alert_radius :: Maybe Int
proximity_alert_radius = Maybe Int
forall a. Maybe a
Nothing
}