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