{-# 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.FSx.Types.DataRepositoryFailureDetails 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 DataRepositoryFailureDetails = DataRepositoryFailureDetails'
{ DataRepositoryFailureDetails -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (DataRepositoryFailureDetails
-> DataRepositoryFailureDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataRepositoryFailureDetails
-> DataRepositoryFailureDetails -> Bool
$c/= :: DataRepositoryFailureDetails
-> DataRepositoryFailureDetails -> Bool
== :: DataRepositoryFailureDetails
-> DataRepositoryFailureDetails -> Bool
$c== :: DataRepositoryFailureDetails
-> DataRepositoryFailureDetails -> Bool
Prelude.Eq, ReadPrec [DataRepositoryFailureDetails]
ReadPrec DataRepositoryFailureDetails
Int -> ReadS DataRepositoryFailureDetails
ReadS [DataRepositoryFailureDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataRepositoryFailureDetails]
$creadListPrec :: ReadPrec [DataRepositoryFailureDetails]
readPrec :: ReadPrec DataRepositoryFailureDetails
$creadPrec :: ReadPrec DataRepositoryFailureDetails
readList :: ReadS [DataRepositoryFailureDetails]
$creadList :: ReadS [DataRepositoryFailureDetails]
readsPrec :: Int -> ReadS DataRepositoryFailureDetails
$creadsPrec :: Int -> ReadS DataRepositoryFailureDetails
Prelude.Read, Int -> DataRepositoryFailureDetails -> ShowS
[DataRepositoryFailureDetails] -> ShowS
DataRepositoryFailureDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataRepositoryFailureDetails] -> ShowS
$cshowList :: [DataRepositoryFailureDetails] -> ShowS
show :: DataRepositoryFailureDetails -> String
$cshow :: DataRepositoryFailureDetails -> String
showsPrec :: Int -> DataRepositoryFailureDetails -> ShowS
$cshowsPrec :: Int -> DataRepositoryFailureDetails -> ShowS
Prelude.Show, forall x.
Rep DataRepositoryFailureDetails x -> DataRepositoryFailureDetails
forall x.
DataRepositoryFailureDetails -> Rep DataRepositoryFailureDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DataRepositoryFailureDetails x -> DataRepositoryFailureDetails
$cfrom :: forall x.
DataRepositoryFailureDetails -> Rep DataRepositoryFailureDetails x
Prelude.Generic)
newDataRepositoryFailureDetails ::
DataRepositoryFailureDetails
newDataRepositoryFailureDetails :: DataRepositoryFailureDetails
newDataRepositoryFailureDetails =
DataRepositoryFailureDetails'
{ $sel:message:DataRepositoryFailureDetails' :: Maybe Text
message =
forall a. Maybe a
Prelude.Nothing
}
dataRepositoryFailureDetails_message :: Lens.Lens' DataRepositoryFailureDetails (Prelude.Maybe Prelude.Text)
dataRepositoryFailureDetails_message :: Lens' DataRepositoryFailureDetails (Maybe Text)
dataRepositoryFailureDetails_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataRepositoryFailureDetails' {Maybe Text
message :: Maybe Text
$sel:message:DataRepositoryFailureDetails' :: DataRepositoryFailureDetails -> Maybe Text
message} -> Maybe Text
message) (\s :: DataRepositoryFailureDetails
s@DataRepositoryFailureDetails' {} Maybe Text
a -> DataRepositoryFailureDetails
s {$sel:message:DataRepositoryFailureDetails' :: Maybe Text
message = Maybe Text
a} :: DataRepositoryFailureDetails)
instance Data.FromJSON DataRepositoryFailureDetails where
parseJSON :: Value -> Parser DataRepositoryFailureDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DataRepositoryFailureDetails"
( \Object
x ->
Maybe Text -> DataRepositoryFailureDetails
DataRepositoryFailureDetails'
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
"Message")
)
instance
Prelude.Hashable
DataRepositoryFailureDetails
where
hashWithSalt :: Int -> DataRepositoryFailureDetails -> Int
hashWithSalt Int
_salt DataRepositoryFailureDetails' {Maybe Text
message :: Maybe Text
$sel:message:DataRepositoryFailureDetails' :: DataRepositoryFailureDetails -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
instance Prelude.NFData DataRepositoryFailureDetails where
rnf :: DataRepositoryFailureDetails -> ()
rnf DataRepositoryFailureDetails' {Maybe Text
message :: Maybe Text
$sel:message:DataRepositoryFailureDetails' :: DataRepositoryFailureDetails -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message