{-# 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.InputSwitchScheduleActionSettings 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 InputSwitchScheduleActionSettings = InputSwitchScheduleActionSettings'
{
InputSwitchScheduleActionSettings -> Maybe InputClippingSettings
inputClippingSettings :: Prelude.Maybe InputClippingSettings,
InputSwitchScheduleActionSettings -> Maybe [Text]
urlPath :: Prelude.Maybe [Prelude.Text],
InputSwitchScheduleActionSettings -> Text
inputAttachmentNameReference :: Prelude.Text
}
deriving (InputSwitchScheduleActionSettings
-> InputSwitchScheduleActionSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputSwitchScheduleActionSettings
-> InputSwitchScheduleActionSettings -> Bool
$c/= :: InputSwitchScheduleActionSettings
-> InputSwitchScheduleActionSettings -> Bool
== :: InputSwitchScheduleActionSettings
-> InputSwitchScheduleActionSettings -> Bool
$c== :: InputSwitchScheduleActionSettings
-> InputSwitchScheduleActionSettings -> Bool
Prelude.Eq, ReadPrec [InputSwitchScheduleActionSettings]
ReadPrec InputSwitchScheduleActionSettings
Int -> ReadS InputSwitchScheduleActionSettings
ReadS [InputSwitchScheduleActionSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputSwitchScheduleActionSettings]
$creadListPrec :: ReadPrec [InputSwitchScheduleActionSettings]
readPrec :: ReadPrec InputSwitchScheduleActionSettings
$creadPrec :: ReadPrec InputSwitchScheduleActionSettings
readList :: ReadS [InputSwitchScheduleActionSettings]
$creadList :: ReadS [InputSwitchScheduleActionSettings]
readsPrec :: Int -> ReadS InputSwitchScheduleActionSettings
$creadsPrec :: Int -> ReadS InputSwitchScheduleActionSettings
Prelude.Read, Int -> InputSwitchScheduleActionSettings -> ShowS
[InputSwitchScheduleActionSettings] -> ShowS
InputSwitchScheduleActionSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputSwitchScheduleActionSettings] -> ShowS
$cshowList :: [InputSwitchScheduleActionSettings] -> ShowS
show :: InputSwitchScheduleActionSettings -> String
$cshow :: InputSwitchScheduleActionSettings -> String
showsPrec :: Int -> InputSwitchScheduleActionSettings -> ShowS
$cshowsPrec :: Int -> InputSwitchScheduleActionSettings -> ShowS
Prelude.Show, forall x.
Rep InputSwitchScheduleActionSettings x
-> InputSwitchScheduleActionSettings
forall x.
InputSwitchScheduleActionSettings
-> Rep InputSwitchScheduleActionSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InputSwitchScheduleActionSettings x
-> InputSwitchScheduleActionSettings
$cfrom :: forall x.
InputSwitchScheduleActionSettings
-> Rep InputSwitchScheduleActionSettings x
Prelude.Generic)
newInputSwitchScheduleActionSettings ::
Prelude.Text ->
InputSwitchScheduleActionSettings
newInputSwitchScheduleActionSettings :: Text -> InputSwitchScheduleActionSettings
newInputSwitchScheduleActionSettings
Text
pInputAttachmentNameReference_ =
InputSwitchScheduleActionSettings'
{ $sel:inputClippingSettings:InputSwitchScheduleActionSettings' :: Maybe InputClippingSettings
inputClippingSettings =
forall a. Maybe a
Prelude.Nothing,
$sel:urlPath:InputSwitchScheduleActionSettings' :: Maybe [Text]
urlPath = forall a. Maybe a
Prelude.Nothing,
$sel:inputAttachmentNameReference:InputSwitchScheduleActionSettings' :: Text
inputAttachmentNameReference =
Text
pInputAttachmentNameReference_
}
inputSwitchScheduleActionSettings_inputClippingSettings :: Lens.Lens' InputSwitchScheduleActionSettings (Prelude.Maybe InputClippingSettings)
inputSwitchScheduleActionSettings_inputClippingSettings :: Lens'
InputSwitchScheduleActionSettings (Maybe InputClippingSettings)
inputSwitchScheduleActionSettings_inputClippingSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputSwitchScheduleActionSettings' {Maybe InputClippingSettings
inputClippingSettings :: Maybe InputClippingSettings
$sel:inputClippingSettings:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Maybe InputClippingSettings
inputClippingSettings} -> Maybe InputClippingSettings
inputClippingSettings) (\s :: InputSwitchScheduleActionSettings
s@InputSwitchScheduleActionSettings' {} Maybe InputClippingSettings
a -> InputSwitchScheduleActionSettings
s {$sel:inputClippingSettings:InputSwitchScheduleActionSettings' :: Maybe InputClippingSettings
inputClippingSettings = Maybe InputClippingSettings
a} :: InputSwitchScheduleActionSettings)
inputSwitchScheduleActionSettings_urlPath :: Lens.Lens' InputSwitchScheduleActionSettings (Prelude.Maybe [Prelude.Text])
inputSwitchScheduleActionSettings_urlPath :: Lens' InputSwitchScheduleActionSettings (Maybe [Text])
inputSwitchScheduleActionSettings_urlPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputSwitchScheduleActionSettings' {Maybe [Text]
urlPath :: Maybe [Text]
$sel:urlPath:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Maybe [Text]
urlPath} -> Maybe [Text]
urlPath) (\s :: InputSwitchScheduleActionSettings
s@InputSwitchScheduleActionSettings' {} Maybe [Text]
a -> InputSwitchScheduleActionSettings
s {$sel:urlPath:InputSwitchScheduleActionSettings' :: Maybe [Text]
urlPath = Maybe [Text]
a} :: InputSwitchScheduleActionSettings) 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
inputSwitchScheduleActionSettings_inputAttachmentNameReference :: Lens.Lens' InputSwitchScheduleActionSettings Prelude.Text
inputSwitchScheduleActionSettings_inputAttachmentNameReference :: Lens' InputSwitchScheduleActionSettings Text
inputSwitchScheduleActionSettings_inputAttachmentNameReference = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputSwitchScheduleActionSettings' {Text
inputAttachmentNameReference :: Text
$sel:inputAttachmentNameReference:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Text
inputAttachmentNameReference} -> Text
inputAttachmentNameReference) (\s :: InputSwitchScheduleActionSettings
s@InputSwitchScheduleActionSettings' {} Text
a -> InputSwitchScheduleActionSettings
s {$sel:inputAttachmentNameReference:InputSwitchScheduleActionSettings' :: Text
inputAttachmentNameReference = Text
a} :: InputSwitchScheduleActionSettings)
instance
Data.FromJSON
InputSwitchScheduleActionSettings
where
parseJSON :: Value -> Parser InputSwitchScheduleActionSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"InputSwitchScheduleActionSettings"
( \Object
x ->
Maybe InputClippingSettings
-> Maybe [Text] -> Text -> InputSwitchScheduleActionSettings
InputSwitchScheduleActionSettings'
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
"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)
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
"inputAttachmentNameReference")
)
instance
Prelude.Hashable
InputSwitchScheduleActionSettings
where
hashWithSalt :: Int -> InputSwitchScheduleActionSettings -> Int
hashWithSalt
Int
_salt
InputSwitchScheduleActionSettings' {Maybe [Text]
Maybe InputClippingSettings
Text
inputAttachmentNameReference :: Text
urlPath :: Maybe [Text]
inputClippingSettings :: Maybe InputClippingSettings
$sel:inputAttachmentNameReference:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Text
$sel:urlPath:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Maybe [Text]
$sel:inputClippingSettings:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Maybe InputClippingSettings
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputClippingSettings
inputClippingSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
urlPath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
inputAttachmentNameReference
instance
Prelude.NFData
InputSwitchScheduleActionSettings
where
rnf :: InputSwitchScheduleActionSettings -> ()
rnf InputSwitchScheduleActionSettings' {Maybe [Text]
Maybe InputClippingSettings
Text
inputAttachmentNameReference :: Text
urlPath :: Maybe [Text]
inputClippingSettings :: Maybe InputClippingSettings
$sel:inputAttachmentNameReference:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Text
$sel:urlPath:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Maybe [Text]
$sel:inputClippingSettings:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Maybe InputClippingSettings
..} =
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
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
inputAttachmentNameReference
instance
Data.ToJSON
InputSwitchScheduleActionSettings
where
toJSON :: InputSwitchScheduleActionSettings -> Value
toJSON InputSwitchScheduleActionSettings' {Maybe [Text]
Maybe InputClippingSettings
Text
inputAttachmentNameReference :: Text
urlPath :: Maybe [Text]
inputClippingSettings :: Maybe InputClippingSettings
$sel:inputAttachmentNameReference:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Text
$sel:urlPath:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Maybe [Text]
$sel:inputClippingSettings:InputSwitchScheduleActionSettings' :: InputSwitchScheduleActionSettings -> Maybe InputClippingSettings
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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,
forall a. a -> Maybe a
Prelude.Just
( Key
"inputAttachmentNameReference"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
inputAttachmentNameReference
)
]
)