{-# 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.BatchFailedResultModel where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchFailedResultModel = BatchFailedResultModel'
{
BatchFailedResultModel -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
BatchFailedResultModel -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
BatchFailedResultModel -> Maybe Text
code :: Prelude.Maybe Prelude.Text,
BatchFailedResultModel -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (BatchFailedResultModel -> BatchFailedResultModel -> Bool
(BatchFailedResultModel -> BatchFailedResultModel -> Bool)
-> (BatchFailedResultModel -> BatchFailedResultModel -> Bool)
-> Eq BatchFailedResultModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchFailedResultModel -> BatchFailedResultModel -> Bool
$c/= :: BatchFailedResultModel -> BatchFailedResultModel -> Bool
== :: BatchFailedResultModel -> BatchFailedResultModel -> Bool
$c== :: BatchFailedResultModel -> BatchFailedResultModel -> Bool
Prelude.Eq, ReadPrec [BatchFailedResultModel]
ReadPrec BatchFailedResultModel
Int -> ReadS BatchFailedResultModel
ReadS [BatchFailedResultModel]
(Int -> ReadS BatchFailedResultModel)
-> ReadS [BatchFailedResultModel]
-> ReadPrec BatchFailedResultModel
-> ReadPrec [BatchFailedResultModel]
-> Read BatchFailedResultModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchFailedResultModel]
$creadListPrec :: ReadPrec [BatchFailedResultModel]
readPrec :: ReadPrec BatchFailedResultModel
$creadPrec :: ReadPrec BatchFailedResultModel
readList :: ReadS [BatchFailedResultModel]
$creadList :: ReadS [BatchFailedResultModel]
readsPrec :: Int -> ReadS BatchFailedResultModel
$creadsPrec :: Int -> ReadS BatchFailedResultModel
Prelude.Read, Int -> BatchFailedResultModel -> ShowS
[BatchFailedResultModel] -> ShowS
BatchFailedResultModel -> String
(Int -> BatchFailedResultModel -> ShowS)
-> (BatchFailedResultModel -> String)
-> ([BatchFailedResultModel] -> ShowS)
-> Show BatchFailedResultModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchFailedResultModel] -> ShowS
$cshowList :: [BatchFailedResultModel] -> ShowS
show :: BatchFailedResultModel -> String
$cshow :: BatchFailedResultModel -> String
showsPrec :: Int -> BatchFailedResultModel -> ShowS
$cshowsPrec :: Int -> BatchFailedResultModel -> ShowS
Prelude.Show, (forall x. BatchFailedResultModel -> Rep BatchFailedResultModel x)
-> (forall x.
Rep BatchFailedResultModel x -> BatchFailedResultModel)
-> Generic BatchFailedResultModel
forall x. Rep BatchFailedResultModel x -> BatchFailedResultModel
forall x. BatchFailedResultModel -> Rep BatchFailedResultModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchFailedResultModel x -> BatchFailedResultModel
$cfrom :: forall x. BatchFailedResultModel -> Rep BatchFailedResultModel x
Prelude.Generic)
newBatchFailedResultModel ::
BatchFailedResultModel
newBatchFailedResultModel :: BatchFailedResultModel
newBatchFailedResultModel =
BatchFailedResultModel' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> BatchFailedResultModel
BatchFailedResultModel'
{ $sel:arn:BatchFailedResultModel' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:BatchFailedResultModel' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:code:BatchFailedResultModel' :: Maybe Text
code = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:BatchFailedResultModel' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
batchFailedResultModel_arn :: Lens.Lens' BatchFailedResultModel (Prelude.Maybe Prelude.Text)
batchFailedResultModel_arn :: (Maybe Text -> f (Maybe Text))
-> BatchFailedResultModel -> f BatchFailedResultModel
batchFailedResultModel_arn = (BatchFailedResultModel -> Maybe Text)
-> (BatchFailedResultModel -> Maybe Text -> BatchFailedResultModel)
-> Lens
BatchFailedResultModel
BatchFailedResultModel
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchFailedResultModel' {Maybe Text
arn :: Maybe Text
$sel:arn:BatchFailedResultModel' :: BatchFailedResultModel -> Maybe Text
arn} -> Maybe Text
arn) (\s :: BatchFailedResultModel
s@BatchFailedResultModel' {} Maybe Text
a -> BatchFailedResultModel
s {$sel:arn:BatchFailedResultModel' :: Maybe Text
arn = Maybe Text
a} :: BatchFailedResultModel)
batchFailedResultModel_id :: Lens.Lens' BatchFailedResultModel (Prelude.Maybe Prelude.Text)
batchFailedResultModel_id :: (Maybe Text -> f (Maybe Text))
-> BatchFailedResultModel -> f BatchFailedResultModel
batchFailedResultModel_id = (BatchFailedResultModel -> Maybe Text)
-> (BatchFailedResultModel -> Maybe Text -> BatchFailedResultModel)
-> Lens
BatchFailedResultModel
BatchFailedResultModel
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchFailedResultModel' {Maybe Text
id :: Maybe Text
$sel:id:BatchFailedResultModel' :: BatchFailedResultModel -> Maybe Text
id} -> Maybe Text
id) (\s :: BatchFailedResultModel
s@BatchFailedResultModel' {} Maybe Text
a -> BatchFailedResultModel
s {$sel:id:BatchFailedResultModel' :: Maybe Text
id = Maybe Text
a} :: BatchFailedResultModel)
batchFailedResultModel_code :: Lens.Lens' BatchFailedResultModel (Prelude.Maybe Prelude.Text)
batchFailedResultModel_code :: (Maybe Text -> f (Maybe Text))
-> BatchFailedResultModel -> f BatchFailedResultModel
batchFailedResultModel_code = (BatchFailedResultModel -> Maybe Text)
-> (BatchFailedResultModel -> Maybe Text -> BatchFailedResultModel)
-> Lens
BatchFailedResultModel
BatchFailedResultModel
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchFailedResultModel' {Maybe Text
code :: Maybe Text
$sel:code:BatchFailedResultModel' :: BatchFailedResultModel -> Maybe Text
code} -> Maybe Text
code) (\s :: BatchFailedResultModel
s@BatchFailedResultModel' {} Maybe Text
a -> BatchFailedResultModel
s {$sel:code:BatchFailedResultModel' :: Maybe Text
code = Maybe Text
a} :: BatchFailedResultModel)
batchFailedResultModel_message :: Lens.Lens' BatchFailedResultModel (Prelude.Maybe Prelude.Text)
batchFailedResultModel_message :: (Maybe Text -> f (Maybe Text))
-> BatchFailedResultModel -> f BatchFailedResultModel
batchFailedResultModel_message = (BatchFailedResultModel -> Maybe Text)
-> (BatchFailedResultModel -> Maybe Text -> BatchFailedResultModel)
-> Lens
BatchFailedResultModel
BatchFailedResultModel
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchFailedResultModel' {Maybe Text
message :: Maybe Text
$sel:message:BatchFailedResultModel' :: BatchFailedResultModel -> Maybe Text
message} -> Maybe Text
message) (\s :: BatchFailedResultModel
s@BatchFailedResultModel' {} Maybe Text
a -> BatchFailedResultModel
s {$sel:message:BatchFailedResultModel' :: Maybe Text
message = Maybe Text
a} :: BatchFailedResultModel)
instance Core.FromJSON BatchFailedResultModel where
parseJSON :: Value -> Parser BatchFailedResultModel
parseJSON =
String
-> (Object -> Parser BatchFailedResultModel)
-> Value
-> Parser BatchFailedResultModel
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchFailedResultModel"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> BatchFailedResultModel
BatchFailedResultModel'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BatchFailedResultModel)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> BatchFailedResultModel)
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
"arn")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> BatchFailedResultModel)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> BatchFailedResultModel)
forall (f :: * -> *) a b. Applicative f => 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
"id")
Parser (Maybe Text -> Maybe Text -> BatchFailedResultModel)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> BatchFailedResultModel)
forall (f :: * -> *) a b. Applicative f => 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
"code")
Parser (Maybe Text -> BatchFailedResultModel)
-> Parser (Maybe Text) -> Parser BatchFailedResultModel
forall (f :: * -> *) a b. Applicative f => 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
"message")
)
instance Prelude.Hashable BatchFailedResultModel
instance Prelude.NFData BatchFailedResultModel