{-# 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.InputPrepareScheduleActionSettings 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.InputClippingSettings
import qualified Amazonka.Prelude as Prelude
data InputPrepareScheduleActionSettings = InputPrepareScheduleActionSettings'
{
InputPrepareScheduleActionSettings -> Maybe Text
inputAttachmentNameReference :: Prelude.Maybe Prelude.Text,
InputPrepareScheduleActionSettings -> Maybe InputClippingSettings
inputClippingSettings :: Prelude.Maybe InputClippingSettings,
InputPrepareScheduleActionSettings -> Maybe [Text]
urlPath :: Prelude.Maybe [Prelude.Text]
}
deriving (InputPrepareScheduleActionSettings
-> InputPrepareScheduleActionSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputPrepareScheduleActionSettings
-> InputPrepareScheduleActionSettings -> Bool
$c/= :: InputPrepareScheduleActionSettings
-> InputPrepareScheduleActionSettings -> Bool
== :: InputPrepareScheduleActionSettings
-> InputPrepareScheduleActionSettings -> Bool
$c== :: InputPrepareScheduleActionSettings
-> InputPrepareScheduleActionSettings -> Bool
Prelude.Eq, ReadPrec [InputPrepareScheduleActionSettings]
ReadPrec InputPrepareScheduleActionSettings
Int -> ReadS InputPrepareScheduleActionSettings
ReadS [InputPrepareScheduleActionSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputPrepareScheduleActionSettings]
$creadListPrec :: ReadPrec [InputPrepareScheduleActionSettings]
readPrec :: ReadPrec InputPrepareScheduleActionSettings
$creadPrec :: ReadPrec InputPrepareScheduleActionSettings
readList :: ReadS [InputPrepareScheduleActionSettings]
$creadList :: ReadS [InputPrepareScheduleActionSettings]
readsPrec :: Int -> ReadS InputPrepareScheduleActionSettings
$creadsPrec :: Int -> ReadS InputPrepareScheduleActionSettings
Prelude.Read, Int -> InputPrepareScheduleActionSettings -> ShowS
[InputPrepareScheduleActionSettings] -> ShowS
InputPrepareScheduleActionSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputPrepareScheduleActionSettings] -> ShowS
$cshowList :: [InputPrepareScheduleActionSettings] -> ShowS
show :: InputPrepareScheduleActionSettings -> String
$cshow :: InputPrepareScheduleActionSettings -> String
showsPrec :: Int -> InputPrepareScheduleActionSettings -> ShowS
$cshowsPrec :: Int -> InputPrepareScheduleActionSettings -> ShowS
Prelude.Show, forall x.
Rep InputPrepareScheduleActionSettings x
-> InputPrepareScheduleActionSettings
forall x.
InputPrepareScheduleActionSettings
-> Rep InputPrepareScheduleActionSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InputPrepareScheduleActionSettings x
-> InputPrepareScheduleActionSettings
$cfrom :: forall x.
InputPrepareScheduleActionSettings
-> Rep InputPrepareScheduleActionSettings x
Prelude.Generic)
newInputPrepareScheduleActionSettings ::
InputPrepareScheduleActionSettings
newInputPrepareScheduleActionSettings :: InputPrepareScheduleActionSettings
newInputPrepareScheduleActionSettings =
InputPrepareScheduleActionSettings'
{ $sel:inputAttachmentNameReference:InputPrepareScheduleActionSettings' :: Maybe Text
inputAttachmentNameReference =
forall a. Maybe a
Prelude.Nothing,
$sel:inputClippingSettings:InputPrepareScheduleActionSettings' :: Maybe InputClippingSettings
inputClippingSettings = forall a. Maybe a
Prelude.Nothing,
$sel:urlPath:InputPrepareScheduleActionSettings' :: Maybe [Text]
urlPath = forall a. Maybe a
Prelude.Nothing
}
inputPrepareScheduleActionSettings_inputAttachmentNameReference :: Lens.Lens' InputPrepareScheduleActionSettings (Prelude.Maybe Prelude.Text)
inputPrepareScheduleActionSettings_inputAttachmentNameReference :: Lens' InputPrepareScheduleActionSettings (Maybe Text)
inputPrepareScheduleActionSettings_inputAttachmentNameReference = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputPrepareScheduleActionSettings' {Maybe Text
inputAttachmentNameReference :: Maybe Text
$sel:inputAttachmentNameReference:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe Text
inputAttachmentNameReference} -> Maybe Text
inputAttachmentNameReference) (\s :: InputPrepareScheduleActionSettings
s@InputPrepareScheduleActionSettings' {} Maybe Text
a -> InputPrepareScheduleActionSettings
s {$sel:inputAttachmentNameReference:InputPrepareScheduleActionSettings' :: Maybe Text
inputAttachmentNameReference = Maybe Text
a} :: InputPrepareScheduleActionSettings)
inputPrepareScheduleActionSettings_inputClippingSettings :: Lens.Lens' InputPrepareScheduleActionSettings (Prelude.Maybe InputClippingSettings)
inputPrepareScheduleActionSettings_inputClippingSettings :: Lens'
InputPrepareScheduleActionSettings (Maybe InputClippingSettings)
inputPrepareScheduleActionSettings_inputClippingSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputPrepareScheduleActionSettings' {Maybe InputClippingSettings
inputClippingSettings :: Maybe InputClippingSettings
$sel:inputClippingSettings:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe InputClippingSettings
inputClippingSettings} -> Maybe InputClippingSettings
inputClippingSettings) (\s :: InputPrepareScheduleActionSettings
s@InputPrepareScheduleActionSettings' {} Maybe InputClippingSettings
a -> InputPrepareScheduleActionSettings
s {$sel:inputClippingSettings:InputPrepareScheduleActionSettings' :: Maybe InputClippingSettings
inputClippingSettings = Maybe InputClippingSettings
a} :: InputPrepareScheduleActionSettings)
inputPrepareScheduleActionSettings_urlPath :: Lens.Lens' InputPrepareScheduleActionSettings (Prelude.Maybe [Prelude.Text])
inputPrepareScheduleActionSettings_urlPath :: Lens' InputPrepareScheduleActionSettings (Maybe [Text])
inputPrepareScheduleActionSettings_urlPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputPrepareScheduleActionSettings' {Maybe [Text]
urlPath :: Maybe [Text]
$sel:urlPath:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe [Text]
urlPath} -> Maybe [Text]
urlPath) (\s :: InputPrepareScheduleActionSettings
s@InputPrepareScheduleActionSettings' {} Maybe [Text]
a -> InputPrepareScheduleActionSettings
s {$sel:urlPath:InputPrepareScheduleActionSettings' :: Maybe [Text]
urlPath = Maybe [Text]
a} :: InputPrepareScheduleActionSettings) 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
InputPrepareScheduleActionSettings
where
parseJSON :: Value -> Parser InputPrepareScheduleActionSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"InputPrepareScheduleActionSettings"
( \Object
x ->
Maybe Text
-> Maybe InputClippingSettings
-> Maybe [Text]
-> InputPrepareScheduleActionSettings
InputPrepareScheduleActionSettings'
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
"inputAttachmentNameReference")
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
"inputClippingSettings")
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
"urlPath" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
InputPrepareScheduleActionSettings
where
hashWithSalt :: Int -> InputPrepareScheduleActionSettings -> Int
hashWithSalt
Int
_salt
InputPrepareScheduleActionSettings' {Maybe [Text]
Maybe Text
Maybe InputClippingSettings
urlPath :: Maybe [Text]
inputClippingSettings :: Maybe InputClippingSettings
inputAttachmentNameReference :: Maybe Text
$sel:urlPath:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe [Text]
$sel:inputClippingSettings:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe InputClippingSettings
$sel:inputAttachmentNameReference:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
inputAttachmentNameReference
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputClippingSettings
inputClippingSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
urlPath
instance
Prelude.NFData
InputPrepareScheduleActionSettings
where
rnf :: InputPrepareScheduleActionSettings -> ()
rnf InputPrepareScheduleActionSettings' {Maybe [Text]
Maybe Text
Maybe InputClippingSettings
urlPath :: Maybe [Text]
inputClippingSettings :: Maybe InputClippingSettings
inputAttachmentNameReference :: Maybe Text
$sel:urlPath:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe [Text]
$sel:inputClippingSettings:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe InputClippingSettings
$sel:inputAttachmentNameReference:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
inputAttachmentNameReference
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputClippingSettings
inputClippingSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
urlPath
instance
Data.ToJSON
InputPrepareScheduleActionSettings
where
toJSON :: InputPrepareScheduleActionSettings -> Value
toJSON InputPrepareScheduleActionSettings' {Maybe [Text]
Maybe Text
Maybe InputClippingSettings
urlPath :: Maybe [Text]
inputClippingSettings :: Maybe InputClippingSettings
inputAttachmentNameReference :: Maybe Text
$sel:urlPath:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe [Text]
$sel:inputClippingSettings:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe InputClippingSettings
$sel:inputAttachmentNameReference:InputPrepareScheduleActionSettings' :: InputPrepareScheduleActionSettings -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"inputAttachmentNameReference" 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
inputAttachmentNameReference,
(Key
"inputClippingSettings" 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 InputClippingSettings
inputClippingSettings,
(Key
"urlPath" 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]
urlPath
]
)