module TD.Query.GetGroupCallStreamSegment
(GetGroupCallStreamSegment(..)
, defaultGetGroupCallStreamSegment
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified TD.Data.GroupCallVideoQuality as GroupCallVideoQuality
data GetGroupCallStreamSegment
= GetGroupCallStreamSegment
{ GetGroupCallStreamSegment -> Maybe Int
group_call_id :: Maybe Int
, GetGroupCallStreamSegment -> Maybe Int
time_offset :: Maybe Int
, GetGroupCallStreamSegment -> Maybe Int
scale :: Maybe Int
, GetGroupCallStreamSegment -> Maybe Int
channel_id :: Maybe Int
, GetGroupCallStreamSegment -> Maybe GroupCallVideoQuality
video_quality :: Maybe GroupCallVideoQuality.GroupCallVideoQuality
}
deriving (GetGroupCallStreamSegment -> GetGroupCallStreamSegment -> Bool
(GetGroupCallStreamSegment -> GetGroupCallStreamSegment -> Bool)
-> (GetGroupCallStreamSegment -> GetGroupCallStreamSegment -> Bool)
-> Eq GetGroupCallStreamSegment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetGroupCallStreamSegment -> GetGroupCallStreamSegment -> Bool
== :: GetGroupCallStreamSegment -> GetGroupCallStreamSegment -> Bool
$c/= :: GetGroupCallStreamSegment -> GetGroupCallStreamSegment -> Bool
/= :: GetGroupCallStreamSegment -> GetGroupCallStreamSegment -> Bool
Eq, Int -> GetGroupCallStreamSegment -> ShowS
[GetGroupCallStreamSegment] -> ShowS
GetGroupCallStreamSegment -> String
(Int -> GetGroupCallStreamSegment -> ShowS)
-> (GetGroupCallStreamSegment -> String)
-> ([GetGroupCallStreamSegment] -> ShowS)
-> Show GetGroupCallStreamSegment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetGroupCallStreamSegment -> ShowS
showsPrec :: Int -> GetGroupCallStreamSegment -> ShowS
$cshow :: GetGroupCallStreamSegment -> String
show :: GetGroupCallStreamSegment -> String
$cshowList :: [GetGroupCallStreamSegment] -> ShowS
showList :: [GetGroupCallStreamSegment] -> ShowS
Show)
instance I.ShortShow GetGroupCallStreamSegment where
shortShow :: GetGroupCallStreamSegment -> String
shortShow
GetGroupCallStreamSegment
{ group_call_id :: GetGroupCallStreamSegment -> Maybe Int
group_call_id = Maybe Int
group_call_id_
, time_offset :: GetGroupCallStreamSegment -> Maybe Int
time_offset = Maybe Int
time_offset_
, scale :: GetGroupCallStreamSegment -> Maybe Int
scale = Maybe Int
scale_
, channel_id :: GetGroupCallStreamSegment -> Maybe Int
channel_id = Maybe Int
channel_id_
, video_quality :: GetGroupCallStreamSegment -> Maybe GroupCallVideoQuality
video_quality = Maybe GroupCallVideoQuality
video_quality_
}
= String
"GetGroupCallStreamSegment"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"group_call_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
group_call_id_
, String
"time_offset" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
time_offset_
, String
"scale" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
scale_
, String
"channel_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
channel_id_
, String
"video_quality" String -> Maybe GroupCallVideoQuality -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe GroupCallVideoQuality
video_quality_
]
instance AT.ToJSON GetGroupCallStreamSegment where
toJSON :: GetGroupCallStreamSegment -> Value
toJSON
GetGroupCallStreamSegment
{ group_call_id :: GetGroupCallStreamSegment -> Maybe Int
group_call_id = Maybe Int
group_call_id_
, time_offset :: GetGroupCallStreamSegment -> Maybe Int
time_offset = Maybe Int
time_offset_
, scale :: GetGroupCallStreamSegment -> Maybe Int
scale = Maybe Int
scale_
, channel_id :: GetGroupCallStreamSegment -> Maybe Int
channel_id = Maybe Int
channel_id_
, video_quality :: GetGroupCallStreamSegment -> Maybe GroupCallVideoQuality
video_quality = Maybe GroupCallVideoQuality
video_quality_
}
= [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
"getGroupCallStreamSegment"
, Key
"group_call_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
group_call_id_
, Key
"time_offset" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
time_offset_
, Key
"scale" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
scale_
, Key
"channel_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
channel_id_
, Key
"video_quality" Key -> Maybe GroupCallVideoQuality -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe GroupCallVideoQuality
video_quality_
]
defaultGetGroupCallStreamSegment :: GetGroupCallStreamSegment
defaultGetGroupCallStreamSegment :: GetGroupCallStreamSegment
defaultGetGroupCallStreamSegment =
GetGroupCallStreamSegment
{ group_call_id :: Maybe Int
group_call_id = Maybe Int
forall a. Maybe a
Nothing
, time_offset :: Maybe Int
time_offset = Maybe Int
forall a. Maybe a
Nothing
, scale :: Maybe Int
scale = Maybe Int
forall a. Maybe a
Nothing
, channel_id :: Maybe Int
channel_id = Maybe Int
forall a. Maybe a
Nothing
, video_quality :: Maybe GroupCallVideoQuality
video_quality = Maybe GroupCallVideoQuality
forall a. Maybe a
Nothing
}