{-# 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.MediaTailor.Types.ScheduleConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaTailor.Types.Transition
import qualified Amazonka.Prelude as Prelude
data ScheduleConfiguration = ScheduleConfiguration'
{
ScheduleConfiguration -> Transition
transition :: Transition
}
deriving (ScheduleConfiguration -> ScheduleConfiguration -> Bool
(ScheduleConfiguration -> ScheduleConfiguration -> Bool)
-> (ScheduleConfiguration -> ScheduleConfiguration -> Bool)
-> Eq ScheduleConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduleConfiguration -> ScheduleConfiguration -> Bool
$c/= :: ScheduleConfiguration -> ScheduleConfiguration -> Bool
== :: ScheduleConfiguration -> ScheduleConfiguration -> Bool
$c== :: ScheduleConfiguration -> ScheduleConfiguration -> Bool
Prelude.Eq, ReadPrec [ScheduleConfiguration]
ReadPrec ScheduleConfiguration
Int -> ReadS ScheduleConfiguration
ReadS [ScheduleConfiguration]
(Int -> ReadS ScheduleConfiguration)
-> ReadS [ScheduleConfiguration]
-> ReadPrec ScheduleConfiguration
-> ReadPrec [ScheduleConfiguration]
-> Read ScheduleConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduleConfiguration]
$creadListPrec :: ReadPrec [ScheduleConfiguration]
readPrec :: ReadPrec ScheduleConfiguration
$creadPrec :: ReadPrec ScheduleConfiguration
readList :: ReadS [ScheduleConfiguration]
$creadList :: ReadS [ScheduleConfiguration]
readsPrec :: Int -> ReadS ScheduleConfiguration
$creadsPrec :: Int -> ReadS ScheduleConfiguration
Prelude.Read, Int -> ScheduleConfiguration -> ShowS
[ScheduleConfiguration] -> ShowS
ScheduleConfiguration -> String
(Int -> ScheduleConfiguration -> ShowS)
-> (ScheduleConfiguration -> String)
-> ([ScheduleConfiguration] -> ShowS)
-> Show ScheduleConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduleConfiguration] -> ShowS
$cshowList :: [ScheduleConfiguration] -> ShowS
show :: ScheduleConfiguration -> String
$cshow :: ScheduleConfiguration -> String
showsPrec :: Int -> ScheduleConfiguration -> ShowS
$cshowsPrec :: Int -> ScheduleConfiguration -> ShowS
Prelude.Show, (forall x. ScheduleConfiguration -> Rep ScheduleConfiguration x)
-> (forall x. Rep ScheduleConfiguration x -> ScheduleConfiguration)
-> Generic ScheduleConfiguration
forall x. Rep ScheduleConfiguration x -> ScheduleConfiguration
forall x. ScheduleConfiguration -> Rep ScheduleConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScheduleConfiguration x -> ScheduleConfiguration
$cfrom :: forall x. ScheduleConfiguration -> Rep ScheduleConfiguration x
Prelude.Generic)
newScheduleConfiguration ::
Transition ->
ScheduleConfiguration
newScheduleConfiguration :: Transition -> ScheduleConfiguration
newScheduleConfiguration Transition
pTransition_ =
ScheduleConfiguration' :: Transition -> ScheduleConfiguration
ScheduleConfiguration' {$sel:transition:ScheduleConfiguration' :: Transition
transition = Transition
pTransition_}
scheduleConfiguration_transition :: Lens.Lens' ScheduleConfiguration Transition
scheduleConfiguration_transition :: (Transition -> f Transition)
-> ScheduleConfiguration -> f ScheduleConfiguration
scheduleConfiguration_transition = (ScheduleConfiguration -> Transition)
-> (ScheduleConfiguration -> Transition -> ScheduleConfiguration)
-> Lens
ScheduleConfiguration ScheduleConfiguration Transition Transition
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleConfiguration' {Transition
transition :: Transition
$sel:transition:ScheduleConfiguration' :: ScheduleConfiguration -> Transition
transition} -> Transition
transition) (\s :: ScheduleConfiguration
s@ScheduleConfiguration' {} Transition
a -> ScheduleConfiguration
s {$sel:transition:ScheduleConfiguration' :: Transition
transition = Transition
a} :: ScheduleConfiguration)
instance Prelude.Hashable ScheduleConfiguration
instance Prelude.NFData ScheduleConfiguration
instance Core.ToJSON ScheduleConfiguration where
toJSON :: ScheduleConfiguration -> Value
toJSON ScheduleConfiguration' {Transition
transition :: Transition
$sel:transition:ScheduleConfiguration' :: ScheduleConfiguration -> Transition
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Transition" Text -> Transition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Transition
transition)]
)