{-# 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.MemoryDb.Types.UnprocessedCluster where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UnprocessedCluster = UnprocessedCluster'
{
UnprocessedCluster -> Maybe Text
clusterName :: Prelude.Maybe Prelude.Text,
UnprocessedCluster -> Maybe Text
errorType :: Prelude.Maybe Prelude.Text,
UnprocessedCluster -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text
}
deriving (UnprocessedCluster -> UnprocessedCluster -> Bool
(UnprocessedCluster -> UnprocessedCluster -> Bool)
-> (UnprocessedCluster -> UnprocessedCluster -> Bool)
-> Eq UnprocessedCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnprocessedCluster -> UnprocessedCluster -> Bool
$c/= :: UnprocessedCluster -> UnprocessedCluster -> Bool
== :: UnprocessedCluster -> UnprocessedCluster -> Bool
$c== :: UnprocessedCluster -> UnprocessedCluster -> Bool
Prelude.Eq, ReadPrec [UnprocessedCluster]
ReadPrec UnprocessedCluster
Int -> ReadS UnprocessedCluster
ReadS [UnprocessedCluster]
(Int -> ReadS UnprocessedCluster)
-> ReadS [UnprocessedCluster]
-> ReadPrec UnprocessedCluster
-> ReadPrec [UnprocessedCluster]
-> Read UnprocessedCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UnprocessedCluster]
$creadListPrec :: ReadPrec [UnprocessedCluster]
readPrec :: ReadPrec UnprocessedCluster
$creadPrec :: ReadPrec UnprocessedCluster
readList :: ReadS [UnprocessedCluster]
$creadList :: ReadS [UnprocessedCluster]
readsPrec :: Int -> ReadS UnprocessedCluster
$creadsPrec :: Int -> ReadS UnprocessedCluster
Prelude.Read, Int -> UnprocessedCluster -> ShowS
[UnprocessedCluster] -> ShowS
UnprocessedCluster -> String
(Int -> UnprocessedCluster -> ShowS)
-> (UnprocessedCluster -> String)
-> ([UnprocessedCluster] -> ShowS)
-> Show UnprocessedCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnprocessedCluster] -> ShowS
$cshowList :: [UnprocessedCluster] -> ShowS
show :: UnprocessedCluster -> String
$cshow :: UnprocessedCluster -> String
showsPrec :: Int -> UnprocessedCluster -> ShowS
$cshowsPrec :: Int -> UnprocessedCluster -> ShowS
Prelude.Show, (forall x. UnprocessedCluster -> Rep UnprocessedCluster x)
-> (forall x. Rep UnprocessedCluster x -> UnprocessedCluster)
-> Generic UnprocessedCluster
forall x. Rep UnprocessedCluster x -> UnprocessedCluster
forall x. UnprocessedCluster -> Rep UnprocessedCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UnprocessedCluster x -> UnprocessedCluster
$cfrom :: forall x. UnprocessedCluster -> Rep UnprocessedCluster x
Prelude.Generic)
newUnprocessedCluster ::
UnprocessedCluster
newUnprocessedCluster :: UnprocessedCluster
newUnprocessedCluster =
UnprocessedCluster' :: Maybe Text -> Maybe Text -> Maybe Text -> UnprocessedCluster
UnprocessedCluster'
{ $sel:clusterName:UnprocessedCluster' :: Maybe Text
clusterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorType:UnprocessedCluster' :: Maybe Text
errorType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:UnprocessedCluster' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
unprocessedCluster_clusterName :: Lens.Lens' UnprocessedCluster (Prelude.Maybe Prelude.Text)
unprocessedCluster_clusterName :: (Maybe Text -> f (Maybe Text))
-> UnprocessedCluster -> f UnprocessedCluster
unprocessedCluster_clusterName = (UnprocessedCluster -> Maybe Text)
-> (UnprocessedCluster -> Maybe Text -> UnprocessedCluster)
-> Lens
UnprocessedCluster UnprocessedCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnprocessedCluster' {Maybe Text
clusterName :: Maybe Text
$sel:clusterName:UnprocessedCluster' :: UnprocessedCluster -> Maybe Text
clusterName} -> Maybe Text
clusterName) (\s :: UnprocessedCluster
s@UnprocessedCluster' {} Maybe Text
a -> UnprocessedCluster
s {$sel:clusterName:UnprocessedCluster' :: Maybe Text
clusterName = Maybe Text
a} :: UnprocessedCluster)
unprocessedCluster_errorType :: Lens.Lens' UnprocessedCluster (Prelude.Maybe Prelude.Text)
unprocessedCluster_errorType :: (Maybe Text -> f (Maybe Text))
-> UnprocessedCluster -> f UnprocessedCluster
unprocessedCluster_errorType = (UnprocessedCluster -> Maybe Text)
-> (UnprocessedCluster -> Maybe Text -> UnprocessedCluster)
-> Lens
UnprocessedCluster UnprocessedCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnprocessedCluster' {Maybe Text
errorType :: Maybe Text
$sel:errorType:UnprocessedCluster' :: UnprocessedCluster -> Maybe Text
errorType} -> Maybe Text
errorType) (\s :: UnprocessedCluster
s@UnprocessedCluster' {} Maybe Text
a -> UnprocessedCluster
s {$sel:errorType:UnprocessedCluster' :: Maybe Text
errorType = Maybe Text
a} :: UnprocessedCluster)
unprocessedCluster_errorMessage :: Lens.Lens' UnprocessedCluster (Prelude.Maybe Prelude.Text)
unprocessedCluster_errorMessage :: (Maybe Text -> f (Maybe Text))
-> UnprocessedCluster -> f UnprocessedCluster
unprocessedCluster_errorMessage = (UnprocessedCluster -> Maybe Text)
-> (UnprocessedCluster -> Maybe Text -> UnprocessedCluster)
-> Lens
UnprocessedCluster UnprocessedCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnprocessedCluster' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:UnprocessedCluster' :: UnprocessedCluster -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: UnprocessedCluster
s@UnprocessedCluster' {} Maybe Text
a -> UnprocessedCluster
s {$sel:errorMessage:UnprocessedCluster' :: Maybe Text
errorMessage = Maybe Text
a} :: UnprocessedCluster)
instance Core.FromJSON UnprocessedCluster where
parseJSON :: Value -> Parser UnprocessedCluster
parseJSON =
String
-> (Object -> Parser UnprocessedCluster)
-> Value
-> Parser UnprocessedCluster
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UnprocessedCluster"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> UnprocessedCluster
UnprocessedCluster'
(Maybe Text -> Maybe Text -> Maybe Text -> UnprocessedCluster)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> UnprocessedCluster)
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
"ClusterName")
Parser (Maybe Text -> Maybe Text -> UnprocessedCluster)
-> Parser (Maybe Text) -> Parser (Maybe Text -> UnprocessedCluster)
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
"ErrorType")
Parser (Maybe Text -> UnprocessedCluster)
-> Parser (Maybe Text) -> Parser UnprocessedCluster
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
"ErrorMessage")
)
instance Prelude.Hashable UnprocessedCluster
instance Prelude.NFData UnprocessedCluster