{-# 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.MotionGraphicsActivateScheduleActionSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data MotionGraphicsActivateScheduleActionSettings = MotionGraphicsActivateScheduleActionSettings'
{
MotionGraphicsActivateScheduleActionSettings -> Maybe Natural
duration :: Prelude.Maybe Prelude.Natural,
MotionGraphicsActivateScheduleActionSettings -> Maybe Text
passwordParam :: Prelude.Maybe Prelude.Text,
MotionGraphicsActivateScheduleActionSettings -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
MotionGraphicsActivateScheduleActionSettings -> Maybe Text
username :: Prelude.Maybe Prelude.Text
}
deriving (MotionGraphicsActivateScheduleActionSettings
-> MotionGraphicsActivateScheduleActionSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MotionGraphicsActivateScheduleActionSettings
-> MotionGraphicsActivateScheduleActionSettings -> Bool
$c/= :: MotionGraphicsActivateScheduleActionSettings
-> MotionGraphicsActivateScheduleActionSettings -> Bool
== :: MotionGraphicsActivateScheduleActionSettings
-> MotionGraphicsActivateScheduleActionSettings -> Bool
$c== :: MotionGraphicsActivateScheduleActionSettings
-> MotionGraphicsActivateScheduleActionSettings -> Bool
Prelude.Eq, ReadPrec [MotionGraphicsActivateScheduleActionSettings]
ReadPrec MotionGraphicsActivateScheduleActionSettings
Int -> ReadS MotionGraphicsActivateScheduleActionSettings
ReadS [MotionGraphicsActivateScheduleActionSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MotionGraphicsActivateScheduleActionSettings]
$creadListPrec :: ReadPrec [MotionGraphicsActivateScheduleActionSettings]
readPrec :: ReadPrec MotionGraphicsActivateScheduleActionSettings
$creadPrec :: ReadPrec MotionGraphicsActivateScheduleActionSettings
readList :: ReadS [MotionGraphicsActivateScheduleActionSettings]
$creadList :: ReadS [MotionGraphicsActivateScheduleActionSettings]
readsPrec :: Int -> ReadS MotionGraphicsActivateScheduleActionSettings
$creadsPrec :: Int -> ReadS MotionGraphicsActivateScheduleActionSettings
Prelude.Read, Int -> MotionGraphicsActivateScheduleActionSettings -> ShowS
[MotionGraphicsActivateScheduleActionSettings] -> ShowS
MotionGraphicsActivateScheduleActionSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MotionGraphicsActivateScheduleActionSettings] -> ShowS
$cshowList :: [MotionGraphicsActivateScheduleActionSettings] -> ShowS
show :: MotionGraphicsActivateScheduleActionSettings -> String
$cshow :: MotionGraphicsActivateScheduleActionSettings -> String
showsPrec :: Int -> MotionGraphicsActivateScheduleActionSettings -> ShowS
$cshowsPrec :: Int -> MotionGraphicsActivateScheduleActionSettings -> ShowS
Prelude.Show, forall x.
Rep MotionGraphicsActivateScheduleActionSettings x
-> MotionGraphicsActivateScheduleActionSettings
forall x.
MotionGraphicsActivateScheduleActionSettings
-> Rep MotionGraphicsActivateScheduleActionSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MotionGraphicsActivateScheduleActionSettings x
-> MotionGraphicsActivateScheduleActionSettings
$cfrom :: forall x.
MotionGraphicsActivateScheduleActionSettings
-> Rep MotionGraphicsActivateScheduleActionSettings x
Prelude.Generic)
newMotionGraphicsActivateScheduleActionSettings ::
MotionGraphicsActivateScheduleActionSettings
newMotionGraphicsActivateScheduleActionSettings :: MotionGraphicsActivateScheduleActionSettings
newMotionGraphicsActivateScheduleActionSettings =
MotionGraphicsActivateScheduleActionSettings'
{ $sel:duration:MotionGraphicsActivateScheduleActionSettings' :: Maybe Natural
duration =
forall a. Maybe a
Prelude.Nothing,
$sel:passwordParam:MotionGraphicsActivateScheduleActionSettings' :: Maybe Text
passwordParam =
forall a. Maybe a
Prelude.Nothing,
$sel:url:MotionGraphicsActivateScheduleActionSettings' :: Maybe Text
url = forall a. Maybe a
Prelude.Nothing,
$sel:username:MotionGraphicsActivateScheduleActionSettings' :: Maybe Text
username = forall a. Maybe a
Prelude.Nothing
}
motionGraphicsActivateScheduleActionSettings_duration :: Lens.Lens' MotionGraphicsActivateScheduleActionSettings (Prelude.Maybe Prelude.Natural)
motionGraphicsActivateScheduleActionSettings_duration :: Lens' MotionGraphicsActivateScheduleActionSettings (Maybe Natural)
motionGraphicsActivateScheduleActionSettings_duration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MotionGraphicsActivateScheduleActionSettings' {Maybe Natural
duration :: Maybe Natural
$sel:duration:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Natural
duration} -> Maybe Natural
duration) (\s :: MotionGraphicsActivateScheduleActionSettings
s@MotionGraphicsActivateScheduleActionSettings' {} Maybe Natural
a -> MotionGraphicsActivateScheduleActionSettings
s {$sel:duration:MotionGraphicsActivateScheduleActionSettings' :: Maybe Natural
duration = Maybe Natural
a} :: MotionGraphicsActivateScheduleActionSettings)
motionGraphicsActivateScheduleActionSettings_passwordParam :: Lens.Lens' MotionGraphicsActivateScheduleActionSettings (Prelude.Maybe Prelude.Text)
motionGraphicsActivateScheduleActionSettings_passwordParam :: Lens' MotionGraphicsActivateScheduleActionSettings (Maybe Text)
motionGraphicsActivateScheduleActionSettings_passwordParam = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MotionGraphicsActivateScheduleActionSettings' {Maybe Text
passwordParam :: Maybe Text
$sel:passwordParam:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
passwordParam} -> Maybe Text
passwordParam) (\s :: MotionGraphicsActivateScheduleActionSettings
s@MotionGraphicsActivateScheduleActionSettings' {} Maybe Text
a -> MotionGraphicsActivateScheduleActionSettings
s {$sel:passwordParam:MotionGraphicsActivateScheduleActionSettings' :: Maybe Text
passwordParam = Maybe Text
a} :: MotionGraphicsActivateScheduleActionSettings)
motionGraphicsActivateScheduleActionSettings_url :: Lens.Lens' MotionGraphicsActivateScheduleActionSettings (Prelude.Maybe Prelude.Text)
motionGraphicsActivateScheduleActionSettings_url :: Lens' MotionGraphicsActivateScheduleActionSettings (Maybe Text)
motionGraphicsActivateScheduleActionSettings_url = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MotionGraphicsActivateScheduleActionSettings' {Maybe Text
url :: Maybe Text
$sel:url:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
url} -> Maybe Text
url) (\s :: MotionGraphicsActivateScheduleActionSettings
s@MotionGraphicsActivateScheduleActionSettings' {} Maybe Text
a -> MotionGraphicsActivateScheduleActionSettings
s {$sel:url:MotionGraphicsActivateScheduleActionSettings' :: Maybe Text
url = Maybe Text
a} :: MotionGraphicsActivateScheduleActionSettings)
motionGraphicsActivateScheduleActionSettings_username :: Lens.Lens' MotionGraphicsActivateScheduleActionSettings (Prelude.Maybe Prelude.Text)
motionGraphicsActivateScheduleActionSettings_username :: Lens' MotionGraphicsActivateScheduleActionSettings (Maybe Text)
motionGraphicsActivateScheduleActionSettings_username = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MotionGraphicsActivateScheduleActionSettings' {Maybe Text
username :: Maybe Text
$sel:username:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
username} -> Maybe Text
username) (\s :: MotionGraphicsActivateScheduleActionSettings
s@MotionGraphicsActivateScheduleActionSettings' {} Maybe Text
a -> MotionGraphicsActivateScheduleActionSettings
s {$sel:username:MotionGraphicsActivateScheduleActionSettings' :: Maybe Text
username = Maybe Text
a} :: MotionGraphicsActivateScheduleActionSettings)
instance
Data.FromJSON
MotionGraphicsActivateScheduleActionSettings
where
parseJSON :: Value -> Parser MotionGraphicsActivateScheduleActionSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MotionGraphicsActivateScheduleActionSettings"
( \Object
x ->
Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MotionGraphicsActivateScheduleActionSettings
MotionGraphicsActivateScheduleActionSettings'
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
"duration")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"passwordParam")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"url")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"username")
)
instance
Prelude.Hashable
MotionGraphicsActivateScheduleActionSettings
where
hashWithSalt :: Int -> MotionGraphicsActivateScheduleActionSettings -> Int
hashWithSalt
Int
_salt
MotionGraphicsActivateScheduleActionSettings' {Maybe Natural
Maybe Text
username :: Maybe Text
url :: Maybe Text
passwordParam :: Maybe Text
duration :: Maybe Natural
$sel:username:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
$sel:url:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
$sel:passwordParam:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
$sel:duration:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
duration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
passwordParam
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
url
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
username
instance
Prelude.NFData
MotionGraphicsActivateScheduleActionSettings
where
rnf :: MotionGraphicsActivateScheduleActionSettings -> ()
rnf MotionGraphicsActivateScheduleActionSettings' {Maybe Natural
Maybe Text
username :: Maybe Text
url :: Maybe Text
passwordParam :: Maybe Text
duration :: Maybe Natural
$sel:username:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
$sel:url:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
$sel:passwordParam:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
$sel:duration:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
duration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
passwordParam
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
url
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
username
instance
Data.ToJSON
MotionGraphicsActivateScheduleActionSettings
where
toJSON :: MotionGraphicsActivateScheduleActionSettings -> Value
toJSON
MotionGraphicsActivateScheduleActionSettings' {Maybe Natural
Maybe Text
username :: Maybe Text
url :: Maybe Text
passwordParam :: Maybe Text
duration :: Maybe Natural
$sel:username:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
$sel:url:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
$sel:passwordParam:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Text
$sel:duration:MotionGraphicsActivateScheduleActionSettings' :: MotionGraphicsActivateScheduleActionSettings -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"duration" 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 Natural
duration,
(Key
"passwordParam" 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 Text
passwordParam,
(Key
"url" 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 Text
url,
(Key
"username" 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 Text
username
]
)