{-# 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.MediaConvert.Types.JobMessages where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JobMessages = JobMessages'
{
JobMessages -> Maybe [Text]
warning :: Prelude.Maybe [Prelude.Text],
JobMessages -> Maybe [Text]
info :: Prelude.Maybe [Prelude.Text]
}
deriving (JobMessages -> JobMessages -> Bool
(JobMessages -> JobMessages -> Bool)
-> (JobMessages -> JobMessages -> Bool) -> Eq JobMessages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobMessages -> JobMessages -> Bool
$c/= :: JobMessages -> JobMessages -> Bool
== :: JobMessages -> JobMessages -> Bool
$c== :: JobMessages -> JobMessages -> Bool
Prelude.Eq, ReadPrec [JobMessages]
ReadPrec JobMessages
Int -> ReadS JobMessages
ReadS [JobMessages]
(Int -> ReadS JobMessages)
-> ReadS [JobMessages]
-> ReadPrec JobMessages
-> ReadPrec [JobMessages]
-> Read JobMessages
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobMessages]
$creadListPrec :: ReadPrec [JobMessages]
readPrec :: ReadPrec JobMessages
$creadPrec :: ReadPrec JobMessages
readList :: ReadS [JobMessages]
$creadList :: ReadS [JobMessages]
readsPrec :: Int -> ReadS JobMessages
$creadsPrec :: Int -> ReadS JobMessages
Prelude.Read, Int -> JobMessages -> ShowS
[JobMessages] -> ShowS
JobMessages -> String
(Int -> JobMessages -> ShowS)
-> (JobMessages -> String)
-> ([JobMessages] -> ShowS)
-> Show JobMessages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobMessages] -> ShowS
$cshowList :: [JobMessages] -> ShowS
show :: JobMessages -> String
$cshow :: JobMessages -> String
showsPrec :: Int -> JobMessages -> ShowS
$cshowsPrec :: Int -> JobMessages -> ShowS
Prelude.Show, (forall x. JobMessages -> Rep JobMessages x)
-> (forall x. Rep JobMessages x -> JobMessages)
-> Generic JobMessages
forall x. Rep JobMessages x -> JobMessages
forall x. JobMessages -> Rep JobMessages x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobMessages x -> JobMessages
$cfrom :: forall x. JobMessages -> Rep JobMessages x
Prelude.Generic)
newJobMessages ::
JobMessages
newJobMessages :: JobMessages
newJobMessages =
JobMessages' :: Maybe [Text] -> Maybe [Text] -> JobMessages
JobMessages'
{ $sel:warning:JobMessages' :: Maybe [Text]
warning = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:info:JobMessages' :: Maybe [Text]
info = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
jobMessages_warning :: Lens.Lens' JobMessages (Prelude.Maybe [Prelude.Text])
jobMessages_warning :: (Maybe [Text] -> f (Maybe [Text])) -> JobMessages -> f JobMessages
jobMessages_warning = (JobMessages -> Maybe [Text])
-> (JobMessages -> Maybe [Text] -> JobMessages)
-> Lens JobMessages JobMessages (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobMessages' {Maybe [Text]
warning :: Maybe [Text]
$sel:warning:JobMessages' :: JobMessages -> Maybe [Text]
warning} -> Maybe [Text]
warning) (\s :: JobMessages
s@JobMessages' {} Maybe [Text]
a -> JobMessages
s {$sel:warning:JobMessages' :: Maybe [Text]
warning = Maybe [Text]
a} :: JobMessages) ((Maybe [Text] -> f (Maybe [Text]))
-> JobMessages -> f JobMessages)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> JobMessages
-> f JobMessages
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
jobMessages_info :: Lens.Lens' JobMessages (Prelude.Maybe [Prelude.Text])
jobMessages_info :: (Maybe [Text] -> f (Maybe [Text])) -> JobMessages -> f JobMessages
jobMessages_info = (JobMessages -> Maybe [Text])
-> (JobMessages -> Maybe [Text] -> JobMessages)
-> Lens JobMessages JobMessages (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobMessages' {Maybe [Text]
info :: Maybe [Text]
$sel:info:JobMessages' :: JobMessages -> Maybe [Text]
info} -> Maybe [Text]
info) (\s :: JobMessages
s@JobMessages' {} Maybe [Text]
a -> JobMessages
s {$sel:info:JobMessages' :: Maybe [Text]
info = Maybe [Text]
a} :: JobMessages) ((Maybe [Text] -> f (Maybe [Text]))
-> JobMessages -> f JobMessages)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> JobMessages
-> f JobMessages
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 JobMessages where
parseJSON :: Value -> Parser JobMessages
parseJSON =
String
-> (Object -> Parser JobMessages) -> Value -> Parser JobMessages
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JobMessages"
( \Object
x ->
Maybe [Text] -> Maybe [Text] -> JobMessages
JobMessages'
(Maybe [Text] -> Maybe [Text] -> JobMessages)
-> Parser (Maybe [Text]) -> Parser (Maybe [Text] -> JobMessages)
forall (f :: * -> *) a b. Functor 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
"warning" 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)
Parser (Maybe [Text] -> JobMessages)
-> Parser (Maybe [Text]) -> Parser JobMessages
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
"info" 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 JobMessages
instance Prelude.NFData JobMessages