{-# 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.HLSFragmentSelector where
import qualified Amazonka.Core as Core
import Amazonka.KinesisVideoArchivedMedia.Types.HLSFragmentSelectorType
import Amazonka.KinesisVideoArchivedMedia.Types.HLSTimestampRange
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data HLSFragmentSelector = HLSFragmentSelector'
{
HLSFragmentSelector -> Maybe HLSFragmentSelectorType
fragmentSelectorType :: Prelude.Maybe HLSFragmentSelectorType,
HLSFragmentSelector -> Maybe HLSTimestampRange
timestampRange :: Prelude.Maybe HLSTimestampRange
}
deriving (HLSFragmentSelector -> HLSFragmentSelector -> Bool
(HLSFragmentSelector -> HLSFragmentSelector -> Bool)
-> (HLSFragmentSelector -> HLSFragmentSelector -> Bool)
-> Eq HLSFragmentSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HLSFragmentSelector -> HLSFragmentSelector -> Bool
$c/= :: HLSFragmentSelector -> HLSFragmentSelector -> Bool
== :: HLSFragmentSelector -> HLSFragmentSelector -> Bool
$c== :: HLSFragmentSelector -> HLSFragmentSelector -> Bool
Prelude.Eq, ReadPrec [HLSFragmentSelector]
ReadPrec HLSFragmentSelector
Int -> ReadS HLSFragmentSelector
ReadS [HLSFragmentSelector]
(Int -> ReadS HLSFragmentSelector)
-> ReadS [HLSFragmentSelector]
-> ReadPrec HLSFragmentSelector
-> ReadPrec [HLSFragmentSelector]
-> Read HLSFragmentSelector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HLSFragmentSelector]
$creadListPrec :: ReadPrec [HLSFragmentSelector]
readPrec :: ReadPrec HLSFragmentSelector
$creadPrec :: ReadPrec HLSFragmentSelector
readList :: ReadS [HLSFragmentSelector]
$creadList :: ReadS [HLSFragmentSelector]
readsPrec :: Int -> ReadS HLSFragmentSelector
$creadsPrec :: Int -> ReadS HLSFragmentSelector
Prelude.Read, Int -> HLSFragmentSelector -> ShowS
[HLSFragmentSelector] -> ShowS
HLSFragmentSelector -> String
(Int -> HLSFragmentSelector -> ShowS)
-> (HLSFragmentSelector -> String)
-> ([HLSFragmentSelector] -> ShowS)
-> Show HLSFragmentSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HLSFragmentSelector] -> ShowS
$cshowList :: [HLSFragmentSelector] -> ShowS
show :: HLSFragmentSelector -> String
$cshow :: HLSFragmentSelector -> String
showsPrec :: Int -> HLSFragmentSelector -> ShowS
$cshowsPrec :: Int -> HLSFragmentSelector -> ShowS
Prelude.Show, (forall x. HLSFragmentSelector -> Rep HLSFragmentSelector x)
-> (forall x. Rep HLSFragmentSelector x -> HLSFragmentSelector)
-> Generic HLSFragmentSelector
forall x. Rep HLSFragmentSelector x -> HLSFragmentSelector
forall x. HLSFragmentSelector -> Rep HLSFragmentSelector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HLSFragmentSelector x -> HLSFragmentSelector
$cfrom :: forall x. HLSFragmentSelector -> Rep HLSFragmentSelector x
Prelude.Generic)
newHLSFragmentSelector ::
HLSFragmentSelector
newHLSFragmentSelector :: HLSFragmentSelector
newHLSFragmentSelector =
HLSFragmentSelector' :: Maybe HLSFragmentSelectorType
-> Maybe HLSTimestampRange -> HLSFragmentSelector
HLSFragmentSelector'
{ $sel:fragmentSelectorType:HLSFragmentSelector' :: Maybe HLSFragmentSelectorType
fragmentSelectorType =
Maybe HLSFragmentSelectorType
forall a. Maybe a
Prelude.Nothing,
$sel:timestampRange:HLSFragmentSelector' :: Maybe HLSTimestampRange
timestampRange = Maybe HLSTimestampRange
forall a. Maybe a
Prelude.Nothing
}
hLSFragmentSelector_fragmentSelectorType :: Lens.Lens' HLSFragmentSelector (Prelude.Maybe HLSFragmentSelectorType)
hLSFragmentSelector_fragmentSelectorType :: (Maybe HLSFragmentSelectorType
-> f (Maybe HLSFragmentSelectorType))
-> HLSFragmentSelector -> f HLSFragmentSelector
hLSFragmentSelector_fragmentSelectorType = (HLSFragmentSelector -> Maybe HLSFragmentSelectorType)
-> (HLSFragmentSelector
-> Maybe HLSFragmentSelectorType -> HLSFragmentSelector)
-> Lens
HLSFragmentSelector
HLSFragmentSelector
(Maybe HLSFragmentSelectorType)
(Maybe HLSFragmentSelectorType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HLSFragmentSelector' {Maybe HLSFragmentSelectorType
fragmentSelectorType :: Maybe HLSFragmentSelectorType
$sel:fragmentSelectorType:HLSFragmentSelector' :: HLSFragmentSelector -> Maybe HLSFragmentSelectorType
fragmentSelectorType} -> Maybe HLSFragmentSelectorType
fragmentSelectorType) (\s :: HLSFragmentSelector
s@HLSFragmentSelector' {} Maybe HLSFragmentSelectorType
a -> HLSFragmentSelector
s {$sel:fragmentSelectorType:HLSFragmentSelector' :: Maybe HLSFragmentSelectorType
fragmentSelectorType = Maybe HLSFragmentSelectorType
a} :: HLSFragmentSelector)
hLSFragmentSelector_timestampRange :: Lens.Lens' HLSFragmentSelector (Prelude.Maybe HLSTimestampRange)
hLSFragmentSelector_timestampRange :: (Maybe HLSTimestampRange -> f (Maybe HLSTimestampRange))
-> HLSFragmentSelector -> f HLSFragmentSelector
hLSFragmentSelector_timestampRange = (HLSFragmentSelector -> Maybe HLSTimestampRange)
-> (HLSFragmentSelector
-> Maybe HLSTimestampRange -> HLSFragmentSelector)
-> Lens
HLSFragmentSelector
HLSFragmentSelector
(Maybe HLSTimestampRange)
(Maybe HLSTimestampRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HLSFragmentSelector' {Maybe HLSTimestampRange
timestampRange :: Maybe HLSTimestampRange
$sel:timestampRange:HLSFragmentSelector' :: HLSFragmentSelector -> Maybe HLSTimestampRange
timestampRange} -> Maybe HLSTimestampRange
timestampRange) (\s :: HLSFragmentSelector
s@HLSFragmentSelector' {} Maybe HLSTimestampRange
a -> HLSFragmentSelector
s {$sel:timestampRange:HLSFragmentSelector' :: Maybe HLSTimestampRange
timestampRange = Maybe HLSTimestampRange
a} :: HLSFragmentSelector)
instance Prelude.Hashable HLSFragmentSelector
instance Prelude.NFData HLSFragmentSelector
instance Core.ToJSON HLSFragmentSelector where
toJSON :: HLSFragmentSelector -> Value
toJSON HLSFragmentSelector' {Maybe HLSFragmentSelectorType
Maybe HLSTimestampRange
timestampRange :: Maybe HLSTimestampRange
fragmentSelectorType :: Maybe HLSFragmentSelectorType
$sel:timestampRange:HLSFragmentSelector' :: HLSFragmentSelector -> Maybe HLSTimestampRange
$sel:fragmentSelectorType:HLSFragmentSelector' :: HLSFragmentSelector -> Maybe HLSFragmentSelectorType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"FragmentSelectorType" Text -> HLSFragmentSelectorType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HLSFragmentSelectorType -> Pair)
-> Maybe HLSFragmentSelectorType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HLSFragmentSelectorType
fragmentSelectorType,
(Text
"TimestampRange" Text -> HLSTimestampRange -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HLSTimestampRange -> Pair)
-> Maybe HLSTimestampRange -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HLSTimestampRange
timestampRange
]
)