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