{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.KinesisVideoArchivedMedia.Types.ClipFragmentSelector where
import qualified Amazonka.Core as Core
import Amazonka.KinesisVideoArchivedMedia.Types.ClipFragmentSelectorType
import Amazonka.KinesisVideoArchivedMedia.Types.ClipTimestampRange
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ClipFragmentSelector = ClipFragmentSelector'
{
ClipFragmentSelector -> ClipFragmentSelectorType
fragmentSelectorType :: ClipFragmentSelectorType,
ClipFragmentSelector -> ClipTimestampRange
timestampRange :: ClipTimestampRange
}
deriving (ClipFragmentSelector -> ClipFragmentSelector -> Bool
(ClipFragmentSelector -> ClipFragmentSelector -> Bool)
-> (ClipFragmentSelector -> ClipFragmentSelector -> Bool)
-> Eq ClipFragmentSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClipFragmentSelector -> ClipFragmentSelector -> Bool
$c/= :: ClipFragmentSelector -> ClipFragmentSelector -> Bool
== :: ClipFragmentSelector -> ClipFragmentSelector -> Bool
$c== :: ClipFragmentSelector -> ClipFragmentSelector -> Bool
Prelude.Eq, ReadPrec [ClipFragmentSelector]
ReadPrec ClipFragmentSelector
Int -> ReadS ClipFragmentSelector
ReadS [ClipFragmentSelector]
(Int -> ReadS ClipFragmentSelector)
-> ReadS [ClipFragmentSelector]
-> ReadPrec ClipFragmentSelector
-> ReadPrec [ClipFragmentSelector]
-> Read ClipFragmentSelector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClipFragmentSelector]
$creadListPrec :: ReadPrec [ClipFragmentSelector]
readPrec :: ReadPrec ClipFragmentSelector
$creadPrec :: ReadPrec ClipFragmentSelector
readList :: ReadS [ClipFragmentSelector]
$creadList :: ReadS [ClipFragmentSelector]
readsPrec :: Int -> ReadS ClipFragmentSelector
$creadsPrec :: Int -> ReadS ClipFragmentSelector
Prelude.Read, Int -> ClipFragmentSelector -> ShowS
[ClipFragmentSelector] -> ShowS
ClipFragmentSelector -> String
(Int -> ClipFragmentSelector -> ShowS)
-> (ClipFragmentSelector -> String)
-> ([ClipFragmentSelector] -> ShowS)
-> Show ClipFragmentSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClipFragmentSelector] -> ShowS
$cshowList :: [ClipFragmentSelector] -> ShowS
show :: ClipFragmentSelector -> String
$cshow :: ClipFragmentSelector -> String
showsPrec :: Int -> ClipFragmentSelector -> ShowS
$cshowsPrec :: Int -> ClipFragmentSelector -> ShowS
Prelude.Show, (forall x. ClipFragmentSelector -> Rep ClipFragmentSelector x)
-> (forall x. Rep ClipFragmentSelector x -> ClipFragmentSelector)
-> Generic ClipFragmentSelector
forall x. Rep ClipFragmentSelector x -> ClipFragmentSelector
forall x. ClipFragmentSelector -> Rep ClipFragmentSelector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClipFragmentSelector x -> ClipFragmentSelector
$cfrom :: forall x. ClipFragmentSelector -> Rep ClipFragmentSelector x
Prelude.Generic)
newClipFragmentSelector ::
ClipFragmentSelectorType ->
ClipTimestampRange ->
ClipFragmentSelector
newClipFragmentSelector :: ClipFragmentSelectorType
-> ClipTimestampRange -> ClipFragmentSelector
newClipFragmentSelector
ClipFragmentSelectorType
pFragmentSelectorType_
ClipTimestampRange
pTimestampRange_ =
ClipFragmentSelector' :: ClipFragmentSelectorType
-> ClipTimestampRange -> ClipFragmentSelector
ClipFragmentSelector'
{ $sel:fragmentSelectorType:ClipFragmentSelector' :: ClipFragmentSelectorType
fragmentSelectorType =
ClipFragmentSelectorType
pFragmentSelectorType_,
$sel:timestampRange:ClipFragmentSelector' :: ClipTimestampRange
timestampRange = ClipTimestampRange
pTimestampRange_
}
clipFragmentSelector_fragmentSelectorType :: Lens.Lens' ClipFragmentSelector ClipFragmentSelectorType
clipFragmentSelector_fragmentSelectorType :: (ClipFragmentSelectorType -> f ClipFragmentSelectorType)
-> ClipFragmentSelector -> f ClipFragmentSelector
clipFragmentSelector_fragmentSelectorType = (ClipFragmentSelector -> ClipFragmentSelectorType)
-> (ClipFragmentSelector
-> ClipFragmentSelectorType -> ClipFragmentSelector)
-> Lens
ClipFragmentSelector
ClipFragmentSelector
ClipFragmentSelectorType
ClipFragmentSelectorType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClipFragmentSelector' {ClipFragmentSelectorType
fragmentSelectorType :: ClipFragmentSelectorType
$sel:fragmentSelectorType:ClipFragmentSelector' :: ClipFragmentSelector -> ClipFragmentSelectorType
fragmentSelectorType} -> ClipFragmentSelectorType
fragmentSelectorType) (\s :: ClipFragmentSelector
s@ClipFragmentSelector' {} ClipFragmentSelectorType
a -> ClipFragmentSelector
s {$sel:fragmentSelectorType:ClipFragmentSelector' :: ClipFragmentSelectorType
fragmentSelectorType = ClipFragmentSelectorType
a} :: ClipFragmentSelector)
clipFragmentSelector_timestampRange :: Lens.Lens' ClipFragmentSelector ClipTimestampRange
clipFragmentSelector_timestampRange :: (ClipTimestampRange -> f ClipTimestampRange)
-> ClipFragmentSelector -> f ClipFragmentSelector
clipFragmentSelector_timestampRange = (ClipFragmentSelector -> ClipTimestampRange)
-> (ClipFragmentSelector
-> ClipTimestampRange -> ClipFragmentSelector)
-> Lens
ClipFragmentSelector
ClipFragmentSelector
ClipTimestampRange
ClipTimestampRange
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClipFragmentSelector' {ClipTimestampRange
timestampRange :: ClipTimestampRange
$sel:timestampRange:ClipFragmentSelector' :: ClipFragmentSelector -> ClipTimestampRange
timestampRange} -> ClipTimestampRange
timestampRange) (\s :: ClipFragmentSelector
s@ClipFragmentSelector' {} ClipTimestampRange
a -> ClipFragmentSelector
s {$sel:timestampRange:ClipFragmentSelector' :: ClipTimestampRange
timestampRange = ClipTimestampRange
a} :: ClipFragmentSelector)
instance Prelude.Hashable ClipFragmentSelector
instance Prelude.NFData ClipFragmentSelector
instance Core.ToJSON ClipFragmentSelector where
toJSON :: ClipFragmentSelector -> Value
toJSON ClipFragmentSelector' {ClipFragmentSelectorType
ClipTimestampRange
timestampRange :: ClipTimestampRange
fragmentSelectorType :: ClipFragmentSelectorType
$sel:timestampRange:ClipFragmentSelector' :: ClipFragmentSelector -> ClipTimestampRange
$sel:fragmentSelectorType:ClipFragmentSelector' :: ClipFragmentSelector -> ClipFragmentSelectorType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"FragmentSelectorType"
Text -> ClipFragmentSelectorType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ClipFragmentSelectorType
fragmentSelectorType
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"TimestampRange" Text -> ClipTimestampRange -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ClipTimestampRange
timestampRange)
]
)