{-# 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.Lens as Lens
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
(InputPrepareScheduleActionSettings
-> InputPrepareScheduleActionSettings -> Bool)
-> (InputPrepareScheduleActionSettings
-> InputPrepareScheduleActionSettings -> Bool)
-> Eq InputPrepareScheduleActionSettings
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]
(Int -> ReadS InputPrepareScheduleActionSettings)
-> ReadS [InputPrepareScheduleActionSettings]
-> ReadPrec InputPrepareScheduleActionSettings
-> ReadPrec [InputPrepareScheduleActionSettings]
-> Read 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
(Int -> InputPrepareScheduleActionSettings -> ShowS)
-> (InputPrepareScheduleActionSettings -> String)
-> ([InputPrepareScheduleActionSettings] -> ShowS)
-> Show InputPrepareScheduleActionSettings
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.
InputPrepareScheduleActionSettings
-> Rep InputPrepareScheduleActionSettings x)
-> (forall x.
Rep InputPrepareScheduleActionSettings x
-> InputPrepareScheduleActionSettings)
-> Generic InputPrepareScheduleActionSettings
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' :: Maybe Text
-> Maybe InputClippingSettings
-> Maybe [Text]
-> InputPrepareScheduleActionSettings
InputPrepareScheduleActionSettings'
{ $sel:inputAttachmentNameReference:InputPrepareScheduleActionSettings' :: Maybe Text
inputAttachmentNameReference =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:inputClippingSettings:InputPrepareScheduleActionSettings' :: Maybe InputClippingSettings
inputClippingSettings = Maybe InputClippingSettings
forall a. Maybe a
Prelude.Nothing,
$sel:urlPath:InputPrepareScheduleActionSettings' :: Maybe [Text]
urlPath = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
inputPrepareScheduleActionSettings_inputAttachmentNameReference :: Lens.Lens' InputPrepareScheduleActionSettings (Prelude.Maybe Prelude.Text)
inputPrepareScheduleActionSettings_inputAttachmentNameReference :: (Maybe Text -> f (Maybe Text))
-> InputPrepareScheduleActionSettings
-> f InputPrepareScheduleActionSettings
inputPrepareScheduleActionSettings_inputAttachmentNameReference = (InputPrepareScheduleActionSettings -> Maybe Text)
-> (InputPrepareScheduleActionSettings
-> Maybe Text -> InputPrepareScheduleActionSettings)
-> Lens
InputPrepareScheduleActionSettings
InputPrepareScheduleActionSettings
(Maybe Text)
(Maybe Text)
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 :: (Maybe InputClippingSettings -> f (Maybe InputClippingSettings))
-> InputPrepareScheduleActionSettings
-> f InputPrepareScheduleActionSettings
inputPrepareScheduleActionSettings_inputClippingSettings = (InputPrepareScheduleActionSettings -> Maybe InputClippingSettings)
-> (InputPrepareScheduleActionSettings
-> Maybe InputClippingSettings
-> InputPrepareScheduleActionSettings)
-> Lens
InputPrepareScheduleActionSettings
InputPrepareScheduleActionSettings
(Maybe InputClippingSettings)
(Maybe 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 :: (Maybe [Text] -> f (Maybe [Text]))
-> InputPrepareScheduleActionSettings
-> f InputPrepareScheduleActionSettings
inputPrepareScheduleActionSettings_urlPath = (InputPrepareScheduleActionSettings -> Maybe [Text])
-> (InputPrepareScheduleActionSettings
-> Maybe [Text] -> InputPrepareScheduleActionSettings)
-> Lens
InputPrepareScheduleActionSettings
InputPrepareScheduleActionSettings
(Maybe [Text])
(Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
-> InputPrepareScheduleActionSettings
-> f InputPrepareScheduleActionSettings)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> InputPrepareScheduleActionSettings
-> f InputPrepareScheduleActionSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
InputPrepareScheduleActionSettings
where
parseJSON :: Value -> Parser InputPrepareScheduleActionSettings
parseJSON =
String
-> (Object -> Parser InputPrepareScheduleActionSettings)
-> Value
-> Parser InputPrepareScheduleActionSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InputPrepareScheduleActionSettings"
( \Object
x ->
Maybe Text
-> Maybe InputClippingSettings
-> Maybe [Text]
-> InputPrepareScheduleActionSettings
InputPrepareScheduleActionSettings'
(Maybe Text
-> Maybe InputClippingSettings
-> Maybe [Text]
-> InputPrepareScheduleActionSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe InputClippingSettings
-> Maybe [Text] -> InputPrepareScheduleActionSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"inputAttachmentNameReference")
Parser
(Maybe InputClippingSettings
-> Maybe [Text] -> InputPrepareScheduleActionSettings)
-> Parser (Maybe InputClippingSettings)
-> Parser (Maybe [Text] -> InputPrepareScheduleActionSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputClippingSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"inputClippingSettings")
Parser (Maybe [Text] -> InputPrepareScheduleActionSettings)
-> Parser (Maybe [Text])
-> Parser InputPrepareScheduleActionSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"urlPath" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
InputPrepareScheduleActionSettings
instance
Prelude.NFData
InputPrepareScheduleActionSettings
instance
Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"inputAttachmentNameReference" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
inputAttachmentNameReference,
(Text
"inputClippingSettings" Text -> InputClippingSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(InputClippingSettings -> Pair)
-> Maybe InputClippingSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputClippingSettings
inputClippingSettings,
(Text
"urlPath" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
urlPath
]
)