{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:referenceActionName:FollowModeScheduleActionStartSettings' :: Text
referenceActionName =
Text
pReferenceActionName_,
$sel:followPoint:FollowModeScheduleActionStartSettings' :: FollowPoint
followPoint = FollowPoint
pFollowPoint_
}
followModeScheduleActionStartSettings_referenceActionName :: Lens.Lens' FollowModeScheduleActionStartSettings Prelude.Text
followModeScheduleActionStartSettings_referenceActionName :: Lens' FollowModeScheduleActionStartSettings Text
followModeScheduleActionStartSettings_referenceActionName = 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 :: Lens' FollowModeScheduleActionStartSettings FollowPoint
followModeScheduleActionStartSettings_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
Data.FromJSON
FollowModeScheduleActionStartSettings
where
parseJSON :: Value -> Parser FollowModeScheduleActionStartSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FollowModeScheduleActionStartSettings"
( \Object
x ->
Text -> FollowPoint -> FollowModeScheduleActionStartSettings
FollowModeScheduleActionStartSettings'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"referenceActionName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"followPoint")
)
instance
Prelude.Hashable
FollowModeScheduleActionStartSettings
where
hashWithSalt :: Int -> FollowModeScheduleActionStartSettings -> Int
hashWithSalt
Int
_salt
FollowModeScheduleActionStartSettings' {Text
FollowPoint
followPoint :: FollowPoint
referenceActionName :: Text
$sel:followPoint:FollowModeScheduleActionStartSettings' :: FollowModeScheduleActionStartSettings -> FollowPoint
$sel:referenceActionName:FollowModeScheduleActionStartSettings' :: FollowModeScheduleActionStartSettings -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
referenceActionName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` FollowPoint
followPoint
instance
Prelude.NFData
FollowModeScheduleActionStartSettings
where
rnf :: FollowModeScheduleActionStartSettings -> ()
rnf FollowModeScheduleActionStartSettings' {Text
FollowPoint
followPoint :: FollowPoint
referenceActionName :: Text
$sel:followPoint:FollowModeScheduleActionStartSettings' :: FollowModeScheduleActionStartSettings -> FollowPoint
$sel:referenceActionName:FollowModeScheduleActionStartSettings' :: FollowModeScheduleActionStartSettings -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
referenceActionName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf FollowPoint
followPoint
instance
Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"referenceActionName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
referenceActionName),
forall a. a -> Maybe a
Prelude.Just (Key
"followPoint" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= FollowPoint
followPoint)
]
)