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