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