{-# 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.MediaConvert.Types.SpekeKeyProviderCmaf where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SpekeKeyProviderCmaf = SpekeKeyProviderCmaf'
{
SpekeKeyProviderCmaf -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
SpekeKeyProviderCmaf -> Maybe [Text]
dashSignaledSystemIds :: Prelude.Maybe [Prelude.Text],
SpekeKeyProviderCmaf -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
SpekeKeyProviderCmaf -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
SpekeKeyProviderCmaf -> Maybe [Text]
hlsSignaledSystemIds :: Prelude.Maybe [Prelude.Text]
}
deriving (SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
(SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool)
-> (SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool)
-> Eq SpekeKeyProviderCmaf
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
$c/= :: SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
== :: SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
$c== :: SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
Prelude.Eq, ReadPrec [SpekeKeyProviderCmaf]
ReadPrec SpekeKeyProviderCmaf
Int -> ReadS SpekeKeyProviderCmaf
ReadS [SpekeKeyProviderCmaf]
(Int -> ReadS SpekeKeyProviderCmaf)
-> ReadS [SpekeKeyProviderCmaf]
-> ReadPrec SpekeKeyProviderCmaf
-> ReadPrec [SpekeKeyProviderCmaf]
-> Read SpekeKeyProviderCmaf
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SpekeKeyProviderCmaf]
$creadListPrec :: ReadPrec [SpekeKeyProviderCmaf]
readPrec :: ReadPrec SpekeKeyProviderCmaf
$creadPrec :: ReadPrec SpekeKeyProviderCmaf
readList :: ReadS [SpekeKeyProviderCmaf]
$creadList :: ReadS [SpekeKeyProviderCmaf]
readsPrec :: Int -> ReadS SpekeKeyProviderCmaf
$creadsPrec :: Int -> ReadS SpekeKeyProviderCmaf
Prelude.Read, Int -> SpekeKeyProviderCmaf -> ShowS
[SpekeKeyProviderCmaf] -> ShowS
SpekeKeyProviderCmaf -> String
(Int -> SpekeKeyProviderCmaf -> ShowS)
-> (SpekeKeyProviderCmaf -> String)
-> ([SpekeKeyProviderCmaf] -> ShowS)
-> Show SpekeKeyProviderCmaf
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SpekeKeyProviderCmaf] -> ShowS
$cshowList :: [SpekeKeyProviderCmaf] -> ShowS
show :: SpekeKeyProviderCmaf -> String
$cshow :: SpekeKeyProviderCmaf -> String
showsPrec :: Int -> SpekeKeyProviderCmaf -> ShowS
$cshowsPrec :: Int -> SpekeKeyProviderCmaf -> ShowS
Prelude.Show, (forall x. SpekeKeyProviderCmaf -> Rep SpekeKeyProviderCmaf x)
-> (forall x. Rep SpekeKeyProviderCmaf x -> SpekeKeyProviderCmaf)
-> Generic SpekeKeyProviderCmaf
forall x. Rep SpekeKeyProviderCmaf x -> SpekeKeyProviderCmaf
forall x. SpekeKeyProviderCmaf -> Rep SpekeKeyProviderCmaf x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SpekeKeyProviderCmaf x -> SpekeKeyProviderCmaf
$cfrom :: forall x. SpekeKeyProviderCmaf -> Rep SpekeKeyProviderCmaf x
Prelude.Generic)
newSpekeKeyProviderCmaf ::
SpekeKeyProviderCmaf
newSpekeKeyProviderCmaf :: SpekeKeyProviderCmaf
newSpekeKeyProviderCmaf =
SpekeKeyProviderCmaf' :: Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> SpekeKeyProviderCmaf
SpekeKeyProviderCmaf'
{ $sel:resourceId:SpekeKeyProviderCmaf' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dashSignaledSystemIds:SpekeKeyProviderCmaf' :: Maybe [Text]
dashSignaledSystemIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:certificateArn:SpekeKeyProviderCmaf' :: Maybe Text
certificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:url:SpekeKeyProviderCmaf' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hlsSignaledSystemIds:SpekeKeyProviderCmaf' :: Maybe [Text]
hlsSignaledSystemIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
spekeKeyProviderCmaf_resourceId :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe Prelude.Text)
spekeKeyProviderCmaf_resourceId :: (Maybe Text -> f (Maybe Text))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_resourceId = (SpekeKeyProviderCmaf -> Maybe Text)
-> (SpekeKeyProviderCmaf -> Maybe Text -> SpekeKeyProviderCmaf)
-> Lens
SpekeKeyProviderCmaf SpekeKeyProviderCmaf (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe Text
a -> SpekeKeyProviderCmaf
s {$sel:resourceId:SpekeKeyProviderCmaf' :: Maybe Text
resourceId = Maybe Text
a} :: SpekeKeyProviderCmaf)
spekeKeyProviderCmaf_dashSignaledSystemIds :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe [Prelude.Text])
spekeKeyProviderCmaf_dashSignaledSystemIds :: (Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_dashSignaledSystemIds = (SpekeKeyProviderCmaf -> Maybe [Text])
-> (SpekeKeyProviderCmaf -> Maybe [Text] -> SpekeKeyProviderCmaf)
-> Lens
SpekeKeyProviderCmaf
SpekeKeyProviderCmaf
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe [Text]
dashSignaledSystemIds :: Maybe [Text]
$sel:dashSignaledSystemIds:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe [Text]
dashSignaledSystemIds} -> Maybe [Text]
dashSignaledSystemIds) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe [Text]
a -> SpekeKeyProviderCmaf
s {$sel:dashSignaledSystemIds:SpekeKeyProviderCmaf' :: Maybe [Text]
dashSignaledSystemIds = Maybe [Text]
a} :: SpekeKeyProviderCmaf) ((Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf
-> f SpekeKeyProviderCmaf
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
spekeKeyProviderCmaf_certificateArn :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe Prelude.Text)
spekeKeyProviderCmaf_certificateArn :: (Maybe Text -> f (Maybe Text))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_certificateArn = (SpekeKeyProviderCmaf -> Maybe Text)
-> (SpekeKeyProviderCmaf -> Maybe Text -> SpekeKeyProviderCmaf)
-> Lens
SpekeKeyProviderCmaf SpekeKeyProviderCmaf (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe Text
a -> SpekeKeyProviderCmaf
s {$sel:certificateArn:SpekeKeyProviderCmaf' :: Maybe Text
certificateArn = Maybe Text
a} :: SpekeKeyProviderCmaf)
spekeKeyProviderCmaf_url :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe Prelude.Text)
spekeKeyProviderCmaf_url :: (Maybe Text -> f (Maybe Text))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_url = (SpekeKeyProviderCmaf -> Maybe Text)
-> (SpekeKeyProviderCmaf -> Maybe Text -> SpekeKeyProviderCmaf)
-> Lens
SpekeKeyProviderCmaf SpekeKeyProviderCmaf (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe Text
url :: Maybe Text
$sel:url:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
url} -> Maybe Text
url) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe Text
a -> SpekeKeyProviderCmaf
s {$sel:url:SpekeKeyProviderCmaf' :: Maybe Text
url = Maybe Text
a} :: SpekeKeyProviderCmaf)
spekeKeyProviderCmaf_hlsSignaledSystemIds :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe [Prelude.Text])
spekeKeyProviderCmaf_hlsSignaledSystemIds :: (Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_hlsSignaledSystemIds = (SpekeKeyProviderCmaf -> Maybe [Text])
-> (SpekeKeyProviderCmaf -> Maybe [Text] -> SpekeKeyProviderCmaf)
-> Lens
SpekeKeyProviderCmaf
SpekeKeyProviderCmaf
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe [Text]
hlsSignaledSystemIds :: Maybe [Text]
$sel:hlsSignaledSystemIds:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe [Text]
hlsSignaledSystemIds} -> Maybe [Text]
hlsSignaledSystemIds) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe [Text]
a -> SpekeKeyProviderCmaf
s {$sel:hlsSignaledSystemIds:SpekeKeyProviderCmaf' :: Maybe [Text]
hlsSignaledSystemIds = Maybe [Text]
a} :: SpekeKeyProviderCmaf) ((Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf
-> f SpekeKeyProviderCmaf
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON SpekeKeyProviderCmaf where
parseJSON :: Value -> Parser SpekeKeyProviderCmaf
parseJSON =
String
-> (Object -> Parser SpekeKeyProviderCmaf)
-> Value
-> Parser SpekeKeyProviderCmaf
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SpekeKeyProviderCmaf"
( \Object
x ->
Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> SpekeKeyProviderCmaf
SpekeKeyProviderCmaf'
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> SpekeKeyProviderCmaf)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> SpekeKeyProviderCmaf)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceId")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> SpekeKeyProviderCmaf)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text -> Maybe Text -> Maybe [Text] -> SpekeKeyProviderCmaf)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dashSignaledSystemIds"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text -> Maybe Text -> Maybe [Text] -> SpekeKeyProviderCmaf)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Text] -> SpekeKeyProviderCmaf)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"certificateArn")
Parser (Maybe Text -> Maybe [Text] -> SpekeKeyProviderCmaf)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> SpekeKeyProviderCmaf)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"url")
Parser (Maybe [Text] -> SpekeKeyProviderCmaf)
-> Parser (Maybe [Text]) -> Parser SpekeKeyProviderCmaf
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hlsSignaledSystemIds"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable SpekeKeyProviderCmaf
instance Prelude.NFData SpekeKeyProviderCmaf
instance Core.ToJSON SpekeKeyProviderCmaf where
toJSON :: SpekeKeyProviderCmaf -> Value
toJSON SpekeKeyProviderCmaf' {Maybe [Text]
Maybe Text
hlsSignaledSystemIds :: Maybe [Text]
url :: Maybe Text
certificateArn :: Maybe Text
dashSignaledSystemIds :: Maybe [Text]
resourceId :: Maybe Text
$sel:hlsSignaledSystemIds:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe [Text]
$sel:url:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
$sel:certificateArn:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
$sel:dashSignaledSystemIds:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe [Text]
$sel:resourceId:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"resourceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resourceId,
(Text
"dashSignaledSystemIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
dashSignaledSystemIds,
(Text
"certificateArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
certificateArn,
(Text
"url" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
url,
(Text
"hlsSignaledSystemIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
hlsSignaledSystemIds
]
)