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