{-# 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.MediaPackage.Types.HlsIngest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaPackage.Types.IngestEndpoint
import qualified Amazonka.Prelude as Prelude
data HlsIngest = HlsIngest'
{
HlsIngest -> Maybe [IngestEndpoint]
ingestEndpoints :: Prelude.Maybe [IngestEndpoint]
}
deriving (HlsIngest -> HlsIngest -> Bool
(HlsIngest -> HlsIngest -> Bool)
-> (HlsIngest -> HlsIngest -> Bool) -> Eq HlsIngest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsIngest -> HlsIngest -> Bool
$c/= :: HlsIngest -> HlsIngest -> Bool
== :: HlsIngest -> HlsIngest -> Bool
$c== :: HlsIngest -> HlsIngest -> Bool
Prelude.Eq, ReadPrec [HlsIngest]
ReadPrec HlsIngest
Int -> ReadS HlsIngest
ReadS [HlsIngest]
(Int -> ReadS HlsIngest)
-> ReadS [HlsIngest]
-> ReadPrec HlsIngest
-> ReadPrec [HlsIngest]
-> Read HlsIngest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsIngest]
$creadListPrec :: ReadPrec [HlsIngest]
readPrec :: ReadPrec HlsIngest
$creadPrec :: ReadPrec HlsIngest
readList :: ReadS [HlsIngest]
$creadList :: ReadS [HlsIngest]
readsPrec :: Int -> ReadS HlsIngest
$creadsPrec :: Int -> ReadS HlsIngest
Prelude.Read, Int -> HlsIngest -> ShowS
[HlsIngest] -> ShowS
HlsIngest -> String
(Int -> HlsIngest -> ShowS)
-> (HlsIngest -> String)
-> ([HlsIngest] -> ShowS)
-> Show HlsIngest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsIngest] -> ShowS
$cshowList :: [HlsIngest] -> ShowS
show :: HlsIngest -> String
$cshow :: HlsIngest -> String
showsPrec :: Int -> HlsIngest -> ShowS
$cshowsPrec :: Int -> HlsIngest -> ShowS
Prelude.Show, (forall x. HlsIngest -> Rep HlsIngest x)
-> (forall x. Rep HlsIngest x -> HlsIngest) -> Generic HlsIngest
forall x. Rep HlsIngest x -> HlsIngest
forall x. HlsIngest -> Rep HlsIngest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsIngest x -> HlsIngest
$cfrom :: forall x. HlsIngest -> Rep HlsIngest x
Prelude.Generic)
newHlsIngest ::
HlsIngest
newHlsIngest :: HlsIngest
newHlsIngest =
HlsIngest' :: Maybe [IngestEndpoint] -> HlsIngest
HlsIngest' {$sel:ingestEndpoints:HlsIngest' :: Maybe [IngestEndpoint]
ingestEndpoints = Maybe [IngestEndpoint]
forall a. Maybe a
Prelude.Nothing}
hlsIngest_ingestEndpoints :: Lens.Lens' HlsIngest (Prelude.Maybe [IngestEndpoint])
hlsIngest_ingestEndpoints :: (Maybe [IngestEndpoint] -> f (Maybe [IngestEndpoint]))
-> HlsIngest -> f HlsIngest
hlsIngest_ingestEndpoints = (HlsIngest -> Maybe [IngestEndpoint])
-> (HlsIngest -> Maybe [IngestEndpoint] -> HlsIngest)
-> Lens
HlsIngest
HlsIngest
(Maybe [IngestEndpoint])
(Maybe [IngestEndpoint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsIngest' {Maybe [IngestEndpoint]
ingestEndpoints :: Maybe [IngestEndpoint]
$sel:ingestEndpoints:HlsIngest' :: HlsIngest -> Maybe [IngestEndpoint]
ingestEndpoints} -> Maybe [IngestEndpoint]
ingestEndpoints) (\s :: HlsIngest
s@HlsIngest' {} Maybe [IngestEndpoint]
a -> HlsIngest
s {$sel:ingestEndpoints:HlsIngest' :: Maybe [IngestEndpoint]
ingestEndpoints = Maybe [IngestEndpoint]
a} :: HlsIngest) ((Maybe [IngestEndpoint] -> f (Maybe [IngestEndpoint]))
-> HlsIngest -> f HlsIngest)
-> ((Maybe [IngestEndpoint] -> f (Maybe [IngestEndpoint]))
-> Maybe [IngestEndpoint] -> f (Maybe [IngestEndpoint]))
-> (Maybe [IngestEndpoint] -> f (Maybe [IngestEndpoint]))
-> HlsIngest
-> f HlsIngest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[IngestEndpoint] [IngestEndpoint] [IngestEndpoint] [IngestEndpoint]
-> Iso
(Maybe [IngestEndpoint])
(Maybe [IngestEndpoint])
(Maybe [IngestEndpoint])
(Maybe [IngestEndpoint])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[IngestEndpoint] [IngestEndpoint] [IngestEndpoint] [IngestEndpoint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON HlsIngest where
parseJSON :: Value -> Parser HlsIngest
parseJSON =
String -> (Object -> Parser HlsIngest) -> Value -> Parser HlsIngest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HlsIngest"
( \Object
x ->
Maybe [IngestEndpoint] -> HlsIngest
HlsIngest'
(Maybe [IngestEndpoint] -> HlsIngest)
-> Parser (Maybe [IngestEndpoint]) -> Parser HlsIngest
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [IngestEndpoint]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ingestEndpoints"
Parser (Maybe (Maybe [IngestEndpoint]))
-> Maybe [IngestEndpoint] -> Parser (Maybe [IngestEndpoint])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [IngestEndpoint]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable HlsIngest
instance Prelude.NFData HlsIngest