{-# 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.MediaLive.Types.FeatureActivations where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.FeatureActivationsInputPrepareScheduleActions
import qualified Amazonka.Prelude as Prelude
data FeatureActivations = FeatureActivations'
{
FeatureActivations
-> Maybe FeatureActivationsInputPrepareScheduleActions
inputPrepareScheduleActions :: Prelude.Maybe FeatureActivationsInputPrepareScheduleActions
}
deriving (FeatureActivations -> FeatureActivations -> Bool
(FeatureActivations -> FeatureActivations -> Bool)
-> (FeatureActivations -> FeatureActivations -> Bool)
-> Eq FeatureActivations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FeatureActivations -> FeatureActivations -> Bool
$c/= :: FeatureActivations -> FeatureActivations -> Bool
== :: FeatureActivations -> FeatureActivations -> Bool
$c== :: FeatureActivations -> FeatureActivations -> Bool
Prelude.Eq, ReadPrec [FeatureActivations]
ReadPrec FeatureActivations
Int -> ReadS FeatureActivations
ReadS [FeatureActivations]
(Int -> ReadS FeatureActivations)
-> ReadS [FeatureActivations]
-> ReadPrec FeatureActivations
-> ReadPrec [FeatureActivations]
-> Read FeatureActivations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FeatureActivations]
$creadListPrec :: ReadPrec [FeatureActivations]
readPrec :: ReadPrec FeatureActivations
$creadPrec :: ReadPrec FeatureActivations
readList :: ReadS [FeatureActivations]
$creadList :: ReadS [FeatureActivations]
readsPrec :: Int -> ReadS FeatureActivations
$creadsPrec :: Int -> ReadS FeatureActivations
Prelude.Read, Int -> FeatureActivations -> ShowS
[FeatureActivations] -> ShowS
FeatureActivations -> String
(Int -> FeatureActivations -> ShowS)
-> (FeatureActivations -> String)
-> ([FeatureActivations] -> ShowS)
-> Show FeatureActivations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FeatureActivations] -> ShowS
$cshowList :: [FeatureActivations] -> ShowS
show :: FeatureActivations -> String
$cshow :: FeatureActivations -> String
showsPrec :: Int -> FeatureActivations -> ShowS
$cshowsPrec :: Int -> FeatureActivations -> ShowS
Prelude.Show, (forall x. FeatureActivations -> Rep FeatureActivations x)
-> (forall x. Rep FeatureActivations x -> FeatureActivations)
-> Generic FeatureActivations
forall x. Rep FeatureActivations x -> FeatureActivations
forall x. FeatureActivations -> Rep FeatureActivations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FeatureActivations x -> FeatureActivations
$cfrom :: forall x. FeatureActivations -> Rep FeatureActivations x
Prelude.Generic)
newFeatureActivations ::
FeatureActivations
newFeatureActivations :: FeatureActivations
newFeatureActivations =
FeatureActivations' :: Maybe FeatureActivationsInputPrepareScheduleActions
-> FeatureActivations
FeatureActivations'
{ $sel:inputPrepareScheduleActions:FeatureActivations' :: Maybe FeatureActivationsInputPrepareScheduleActions
inputPrepareScheduleActions =
Maybe FeatureActivationsInputPrepareScheduleActions
forall a. Maybe a
Prelude.Nothing
}
featureActivations_inputPrepareScheduleActions :: Lens.Lens' FeatureActivations (Prelude.Maybe FeatureActivationsInputPrepareScheduleActions)
featureActivations_inputPrepareScheduleActions :: (Maybe FeatureActivationsInputPrepareScheduleActions
-> f (Maybe FeatureActivationsInputPrepareScheduleActions))
-> FeatureActivations -> f FeatureActivations
featureActivations_inputPrepareScheduleActions = (FeatureActivations
-> Maybe FeatureActivationsInputPrepareScheduleActions)
-> (FeatureActivations
-> Maybe FeatureActivationsInputPrepareScheduleActions
-> FeatureActivations)
-> Lens
FeatureActivations
FeatureActivations
(Maybe FeatureActivationsInputPrepareScheduleActions)
(Maybe FeatureActivationsInputPrepareScheduleActions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FeatureActivations' {Maybe FeatureActivationsInputPrepareScheduleActions
inputPrepareScheduleActions :: Maybe FeatureActivationsInputPrepareScheduleActions
$sel:inputPrepareScheduleActions:FeatureActivations' :: FeatureActivations
-> Maybe FeatureActivationsInputPrepareScheduleActions
inputPrepareScheduleActions} -> Maybe FeatureActivationsInputPrepareScheduleActions
inputPrepareScheduleActions) (\s :: FeatureActivations
s@FeatureActivations' {} Maybe FeatureActivationsInputPrepareScheduleActions
a -> FeatureActivations
s {$sel:inputPrepareScheduleActions:FeatureActivations' :: Maybe FeatureActivationsInputPrepareScheduleActions
inputPrepareScheduleActions = Maybe FeatureActivationsInputPrepareScheduleActions
a} :: FeatureActivations)
instance Core.FromJSON FeatureActivations where
parseJSON :: Value -> Parser FeatureActivations
parseJSON =
String
-> (Object -> Parser FeatureActivations)
-> Value
-> Parser FeatureActivations
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FeatureActivations"
( \Object
x ->
Maybe FeatureActivationsInputPrepareScheduleActions
-> FeatureActivations
FeatureActivations'
(Maybe FeatureActivationsInputPrepareScheduleActions
-> FeatureActivations)
-> Parser (Maybe FeatureActivationsInputPrepareScheduleActions)
-> Parser FeatureActivations
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Parser (Maybe FeatureActivationsInputPrepareScheduleActions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"inputPrepareScheduleActions")
)
instance Prelude.Hashable FeatureActivations
instance Prelude.NFData FeatureActivations
instance Core.ToJSON FeatureActivations where
toJSON :: FeatureActivations -> Value
toJSON FeatureActivations' {Maybe FeatureActivationsInputPrepareScheduleActions
inputPrepareScheduleActions :: Maybe FeatureActivationsInputPrepareScheduleActions
$sel:inputPrepareScheduleActions:FeatureActivations' :: FeatureActivations
-> Maybe FeatureActivationsInputPrepareScheduleActions
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"inputPrepareScheduleActions" Text -> FeatureActivationsInputPrepareScheduleActions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(FeatureActivationsInputPrepareScheduleActions -> Pair)
-> Maybe FeatureActivationsInputPrepareScheduleActions
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FeatureActivationsInputPrepareScheduleActions
inputPrepareScheduleActions
]
)