{-# 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.ResourceExplorer2.Types.BatchGetViewError where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data BatchGetViewError = BatchGetViewError'
{
BatchGetViewError -> Text
errorMessage :: Prelude.Text,
BatchGetViewError -> Text
viewArn :: Prelude.Text
}
deriving (BatchGetViewError -> BatchGetViewError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetViewError -> BatchGetViewError -> Bool
$c/= :: BatchGetViewError -> BatchGetViewError -> Bool
== :: BatchGetViewError -> BatchGetViewError -> Bool
$c== :: BatchGetViewError -> BatchGetViewError -> Bool
Prelude.Eq, ReadPrec [BatchGetViewError]
ReadPrec BatchGetViewError
Int -> ReadS BatchGetViewError
ReadS [BatchGetViewError]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetViewError]
$creadListPrec :: ReadPrec [BatchGetViewError]
readPrec :: ReadPrec BatchGetViewError
$creadPrec :: ReadPrec BatchGetViewError
readList :: ReadS [BatchGetViewError]
$creadList :: ReadS [BatchGetViewError]
readsPrec :: Int -> ReadS BatchGetViewError
$creadsPrec :: Int -> ReadS BatchGetViewError
Prelude.Read, Int -> BatchGetViewError -> ShowS
[BatchGetViewError] -> ShowS
BatchGetViewError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetViewError] -> ShowS
$cshowList :: [BatchGetViewError] -> ShowS
show :: BatchGetViewError -> String
$cshow :: BatchGetViewError -> String
showsPrec :: Int -> BatchGetViewError -> ShowS
$cshowsPrec :: Int -> BatchGetViewError -> ShowS
Prelude.Show, forall x. Rep BatchGetViewError x -> BatchGetViewError
forall x. BatchGetViewError -> Rep BatchGetViewError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchGetViewError x -> BatchGetViewError
$cfrom :: forall x. BatchGetViewError -> Rep BatchGetViewError x
Prelude.Generic)
newBatchGetViewError ::
Prelude.Text ->
Prelude.Text ->
BatchGetViewError
newBatchGetViewError :: Text -> Text -> BatchGetViewError
newBatchGetViewError Text
pErrorMessage_ Text
pViewArn_ =
BatchGetViewError'
{ $sel:errorMessage:BatchGetViewError' :: Text
errorMessage = Text
pErrorMessage_,
$sel:viewArn:BatchGetViewError' :: Text
viewArn = Text
pViewArn_
}
batchGetViewError_errorMessage :: Lens.Lens' BatchGetViewError Prelude.Text
batchGetViewError_errorMessage :: Lens' BatchGetViewError Text
batchGetViewError_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetViewError' {Text
errorMessage :: Text
$sel:errorMessage:BatchGetViewError' :: BatchGetViewError -> Text
errorMessage} -> Text
errorMessage) (\s :: BatchGetViewError
s@BatchGetViewError' {} Text
a -> BatchGetViewError
s {$sel:errorMessage:BatchGetViewError' :: Text
errorMessage = Text
a} :: BatchGetViewError)
batchGetViewError_viewArn :: Lens.Lens' BatchGetViewError Prelude.Text
batchGetViewError_viewArn :: Lens' BatchGetViewError Text
batchGetViewError_viewArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetViewError' {Text
viewArn :: Text
$sel:viewArn:BatchGetViewError' :: BatchGetViewError -> Text
viewArn} -> Text
viewArn) (\s :: BatchGetViewError
s@BatchGetViewError' {} Text
a -> BatchGetViewError
s {$sel:viewArn:BatchGetViewError' :: Text
viewArn = Text
a} :: BatchGetViewError)
instance Data.FromJSON BatchGetViewError where
parseJSON :: Value -> Parser BatchGetViewError
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchGetViewError"
( \Object
x ->
Text -> Text -> BatchGetViewError
BatchGetViewError'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ErrorMessage")
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
"ViewArn")
)
instance Prelude.Hashable BatchGetViewError where
hashWithSalt :: Int -> BatchGetViewError -> Int
hashWithSalt Int
_salt BatchGetViewError' {Text
viewArn :: Text
errorMessage :: Text
$sel:viewArn:BatchGetViewError' :: BatchGetViewError -> Text
$sel:errorMessage:BatchGetViewError' :: BatchGetViewError -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
viewArn
instance Prelude.NFData BatchGetViewError where
rnf :: BatchGetViewError -> ()
rnf BatchGetViewError' {Text
viewArn :: Text
errorMessage :: Text
$sel:viewArn:BatchGetViewError' :: BatchGetViewError -> Text
$sel:errorMessage:BatchGetViewError' :: BatchGetViewError -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
viewArn