{-# 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.Support.Types.TrustedAdvisorCheckResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Support.Types.TrustedAdvisorCategorySpecificSummary
import Amazonka.Support.Types.TrustedAdvisorResourceDetail
import Amazonka.Support.Types.TrustedAdvisorResourcesSummary
data TrustedAdvisorCheckResult = TrustedAdvisorCheckResult'
{
TrustedAdvisorCheckResult -> Text
checkId :: Prelude.Text,
TrustedAdvisorCheckResult -> Text
timestamp :: Prelude.Text,
TrustedAdvisorCheckResult -> Text
status :: Prelude.Text,
TrustedAdvisorCheckResult -> TrustedAdvisorResourcesSummary
resourcesSummary :: TrustedAdvisorResourcesSummary,
TrustedAdvisorCheckResult -> TrustedAdvisorCategorySpecificSummary
categorySpecificSummary :: TrustedAdvisorCategorySpecificSummary,
TrustedAdvisorCheckResult -> [TrustedAdvisorResourceDetail]
flaggedResources :: [TrustedAdvisorResourceDetail]
}
deriving (TrustedAdvisorCheckResult -> TrustedAdvisorCheckResult -> Bool
(TrustedAdvisorCheckResult -> TrustedAdvisorCheckResult -> Bool)
-> (TrustedAdvisorCheckResult -> TrustedAdvisorCheckResult -> Bool)
-> Eq TrustedAdvisorCheckResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrustedAdvisorCheckResult -> TrustedAdvisorCheckResult -> Bool
$c/= :: TrustedAdvisorCheckResult -> TrustedAdvisorCheckResult -> Bool
== :: TrustedAdvisorCheckResult -> TrustedAdvisorCheckResult -> Bool
$c== :: TrustedAdvisorCheckResult -> TrustedAdvisorCheckResult -> Bool
Prelude.Eq, ReadPrec [TrustedAdvisorCheckResult]
ReadPrec TrustedAdvisorCheckResult
Int -> ReadS TrustedAdvisorCheckResult
ReadS [TrustedAdvisorCheckResult]
(Int -> ReadS TrustedAdvisorCheckResult)
-> ReadS [TrustedAdvisorCheckResult]
-> ReadPrec TrustedAdvisorCheckResult
-> ReadPrec [TrustedAdvisorCheckResult]
-> Read TrustedAdvisorCheckResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrustedAdvisorCheckResult]
$creadListPrec :: ReadPrec [TrustedAdvisorCheckResult]
readPrec :: ReadPrec TrustedAdvisorCheckResult
$creadPrec :: ReadPrec TrustedAdvisorCheckResult
readList :: ReadS [TrustedAdvisorCheckResult]
$creadList :: ReadS [TrustedAdvisorCheckResult]
readsPrec :: Int -> ReadS TrustedAdvisorCheckResult
$creadsPrec :: Int -> ReadS TrustedAdvisorCheckResult
Prelude.Read, Int -> TrustedAdvisorCheckResult -> ShowS
[TrustedAdvisorCheckResult] -> ShowS
TrustedAdvisorCheckResult -> String
(Int -> TrustedAdvisorCheckResult -> ShowS)
-> (TrustedAdvisorCheckResult -> String)
-> ([TrustedAdvisorCheckResult] -> ShowS)
-> Show TrustedAdvisorCheckResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrustedAdvisorCheckResult] -> ShowS
$cshowList :: [TrustedAdvisorCheckResult] -> ShowS
show :: TrustedAdvisorCheckResult -> String
$cshow :: TrustedAdvisorCheckResult -> String
showsPrec :: Int -> TrustedAdvisorCheckResult -> ShowS
$cshowsPrec :: Int -> TrustedAdvisorCheckResult -> ShowS
Prelude.Show, (forall x.
TrustedAdvisorCheckResult -> Rep TrustedAdvisorCheckResult x)
-> (forall x.
Rep TrustedAdvisorCheckResult x -> TrustedAdvisorCheckResult)
-> Generic TrustedAdvisorCheckResult
forall x.
Rep TrustedAdvisorCheckResult x -> TrustedAdvisorCheckResult
forall x.
TrustedAdvisorCheckResult -> Rep TrustedAdvisorCheckResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrustedAdvisorCheckResult x -> TrustedAdvisorCheckResult
$cfrom :: forall x.
TrustedAdvisorCheckResult -> Rep TrustedAdvisorCheckResult x
Prelude.Generic)
newTrustedAdvisorCheckResult ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
TrustedAdvisorResourcesSummary ->
TrustedAdvisorCategorySpecificSummary ->
TrustedAdvisorCheckResult
newTrustedAdvisorCheckResult :: Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckResult
newTrustedAdvisorCheckResult
Text
pCheckId_
Text
pTimestamp_
Text
pStatus_
TrustedAdvisorResourcesSummary
pResourcesSummary_
TrustedAdvisorCategorySpecificSummary
pCategorySpecificSummary_ =
TrustedAdvisorCheckResult' :: Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail]
-> TrustedAdvisorCheckResult
TrustedAdvisorCheckResult'
{ $sel:checkId:TrustedAdvisorCheckResult' :: Text
checkId = Text
pCheckId_,
$sel:timestamp:TrustedAdvisorCheckResult' :: Text
timestamp = Text
pTimestamp_,
$sel:status:TrustedAdvisorCheckResult' :: Text
status = Text
pStatus_,
$sel:resourcesSummary:TrustedAdvisorCheckResult' :: TrustedAdvisorResourcesSummary
resourcesSummary = TrustedAdvisorResourcesSummary
pResourcesSummary_,
$sel:categorySpecificSummary:TrustedAdvisorCheckResult' :: TrustedAdvisorCategorySpecificSummary
categorySpecificSummary =
TrustedAdvisorCategorySpecificSummary
pCategorySpecificSummary_,
$sel:flaggedResources:TrustedAdvisorCheckResult' :: [TrustedAdvisorResourceDetail]
flaggedResources = [TrustedAdvisorResourceDetail]
forall a. Monoid a => a
Prelude.mempty
}
trustedAdvisorCheckResult_checkId :: Lens.Lens' TrustedAdvisorCheckResult Prelude.Text
trustedAdvisorCheckResult_checkId :: (Text -> f Text)
-> TrustedAdvisorCheckResult -> f TrustedAdvisorCheckResult
trustedAdvisorCheckResult_checkId = (TrustedAdvisorCheckResult -> Text)
-> (TrustedAdvisorCheckResult -> Text -> TrustedAdvisorCheckResult)
-> Lens
TrustedAdvisorCheckResult TrustedAdvisorCheckResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckResult' {Text
checkId :: Text
$sel:checkId:TrustedAdvisorCheckResult' :: TrustedAdvisorCheckResult -> Text
checkId} -> Text
checkId) (\s :: TrustedAdvisorCheckResult
s@TrustedAdvisorCheckResult' {} Text
a -> TrustedAdvisorCheckResult
s {$sel:checkId:TrustedAdvisorCheckResult' :: Text
checkId = Text
a} :: TrustedAdvisorCheckResult)
trustedAdvisorCheckResult_timestamp :: Lens.Lens' TrustedAdvisorCheckResult Prelude.Text
trustedAdvisorCheckResult_timestamp :: (Text -> f Text)
-> TrustedAdvisorCheckResult -> f TrustedAdvisorCheckResult
trustedAdvisorCheckResult_timestamp = (TrustedAdvisorCheckResult -> Text)
-> (TrustedAdvisorCheckResult -> Text -> TrustedAdvisorCheckResult)
-> Lens
TrustedAdvisorCheckResult TrustedAdvisorCheckResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckResult' {Text
timestamp :: Text
$sel:timestamp:TrustedAdvisorCheckResult' :: TrustedAdvisorCheckResult -> Text
timestamp} -> Text
timestamp) (\s :: TrustedAdvisorCheckResult
s@TrustedAdvisorCheckResult' {} Text
a -> TrustedAdvisorCheckResult
s {$sel:timestamp:TrustedAdvisorCheckResult' :: Text
timestamp = Text
a} :: TrustedAdvisorCheckResult)
trustedAdvisorCheckResult_status :: Lens.Lens' TrustedAdvisorCheckResult Prelude.Text
trustedAdvisorCheckResult_status :: (Text -> f Text)
-> TrustedAdvisorCheckResult -> f TrustedAdvisorCheckResult
trustedAdvisorCheckResult_status = (TrustedAdvisorCheckResult -> Text)
-> (TrustedAdvisorCheckResult -> Text -> TrustedAdvisorCheckResult)
-> Lens
TrustedAdvisorCheckResult TrustedAdvisorCheckResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckResult' {Text
status :: Text
$sel:status:TrustedAdvisorCheckResult' :: TrustedAdvisorCheckResult -> Text
status} -> Text
status) (\s :: TrustedAdvisorCheckResult
s@TrustedAdvisorCheckResult' {} Text
a -> TrustedAdvisorCheckResult
s {$sel:status:TrustedAdvisorCheckResult' :: Text
status = Text
a} :: TrustedAdvisorCheckResult)
trustedAdvisorCheckResult_resourcesSummary :: Lens.Lens' TrustedAdvisorCheckResult TrustedAdvisorResourcesSummary
trustedAdvisorCheckResult_resourcesSummary :: (TrustedAdvisorResourcesSummary
-> f TrustedAdvisorResourcesSummary)
-> TrustedAdvisorCheckResult -> f TrustedAdvisorCheckResult
trustedAdvisorCheckResult_resourcesSummary = (TrustedAdvisorCheckResult -> TrustedAdvisorResourcesSummary)
-> (TrustedAdvisorCheckResult
-> TrustedAdvisorResourcesSummary -> TrustedAdvisorCheckResult)
-> Lens
TrustedAdvisorCheckResult
TrustedAdvisorCheckResult
TrustedAdvisorResourcesSummary
TrustedAdvisorResourcesSummary
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckResult' {TrustedAdvisorResourcesSummary
resourcesSummary :: TrustedAdvisorResourcesSummary
$sel:resourcesSummary:TrustedAdvisorCheckResult' :: TrustedAdvisorCheckResult -> TrustedAdvisorResourcesSummary
resourcesSummary} -> TrustedAdvisorResourcesSummary
resourcesSummary) (\s :: TrustedAdvisorCheckResult
s@TrustedAdvisorCheckResult' {} TrustedAdvisorResourcesSummary
a -> TrustedAdvisorCheckResult
s {$sel:resourcesSummary:TrustedAdvisorCheckResult' :: TrustedAdvisorResourcesSummary
resourcesSummary = TrustedAdvisorResourcesSummary
a} :: TrustedAdvisorCheckResult)
trustedAdvisorCheckResult_categorySpecificSummary :: Lens.Lens' TrustedAdvisorCheckResult TrustedAdvisorCategorySpecificSummary
trustedAdvisorCheckResult_categorySpecificSummary :: (TrustedAdvisorCategorySpecificSummary
-> f TrustedAdvisorCategorySpecificSummary)
-> TrustedAdvisorCheckResult -> f TrustedAdvisorCheckResult
trustedAdvisorCheckResult_categorySpecificSummary = (TrustedAdvisorCheckResult
-> TrustedAdvisorCategorySpecificSummary)
-> (TrustedAdvisorCheckResult
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckResult)
-> Lens
TrustedAdvisorCheckResult
TrustedAdvisorCheckResult
TrustedAdvisorCategorySpecificSummary
TrustedAdvisorCategorySpecificSummary
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckResult' {TrustedAdvisorCategorySpecificSummary
categorySpecificSummary :: TrustedAdvisorCategorySpecificSummary
$sel:categorySpecificSummary:TrustedAdvisorCheckResult' :: TrustedAdvisorCheckResult -> TrustedAdvisorCategorySpecificSummary
categorySpecificSummary} -> TrustedAdvisorCategorySpecificSummary
categorySpecificSummary) (\s :: TrustedAdvisorCheckResult
s@TrustedAdvisorCheckResult' {} TrustedAdvisorCategorySpecificSummary
a -> TrustedAdvisorCheckResult
s {$sel:categorySpecificSummary:TrustedAdvisorCheckResult' :: TrustedAdvisorCategorySpecificSummary
categorySpecificSummary = TrustedAdvisorCategorySpecificSummary
a} :: TrustedAdvisorCheckResult)
trustedAdvisorCheckResult_flaggedResources :: Lens.Lens' TrustedAdvisorCheckResult [TrustedAdvisorResourceDetail]
trustedAdvisorCheckResult_flaggedResources :: ([TrustedAdvisorResourceDetail]
-> f [TrustedAdvisorResourceDetail])
-> TrustedAdvisorCheckResult -> f TrustedAdvisorCheckResult
trustedAdvisorCheckResult_flaggedResources = (TrustedAdvisorCheckResult -> [TrustedAdvisorResourceDetail])
-> (TrustedAdvisorCheckResult
-> [TrustedAdvisorResourceDetail] -> TrustedAdvisorCheckResult)
-> Lens
TrustedAdvisorCheckResult
TrustedAdvisorCheckResult
[TrustedAdvisorResourceDetail]
[TrustedAdvisorResourceDetail]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckResult' {[TrustedAdvisorResourceDetail]
flaggedResources :: [TrustedAdvisorResourceDetail]
$sel:flaggedResources:TrustedAdvisorCheckResult' :: TrustedAdvisorCheckResult -> [TrustedAdvisorResourceDetail]
flaggedResources} -> [TrustedAdvisorResourceDetail]
flaggedResources) (\s :: TrustedAdvisorCheckResult
s@TrustedAdvisorCheckResult' {} [TrustedAdvisorResourceDetail]
a -> TrustedAdvisorCheckResult
s {$sel:flaggedResources:TrustedAdvisorCheckResult' :: [TrustedAdvisorResourceDetail]
flaggedResources = [TrustedAdvisorResourceDetail]
a} :: TrustedAdvisorCheckResult) (([TrustedAdvisorResourceDetail]
-> f [TrustedAdvisorResourceDetail])
-> TrustedAdvisorCheckResult -> f TrustedAdvisorCheckResult)
-> (([TrustedAdvisorResourceDetail]
-> f [TrustedAdvisorResourceDetail])
-> [TrustedAdvisorResourceDetail]
-> f [TrustedAdvisorResourceDetail])
-> ([TrustedAdvisorResourceDetail]
-> f [TrustedAdvisorResourceDetail])
-> TrustedAdvisorCheckResult
-> f TrustedAdvisorCheckResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([TrustedAdvisorResourceDetail]
-> f [TrustedAdvisorResourceDetail])
-> [TrustedAdvisorResourceDetail]
-> f [TrustedAdvisorResourceDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON TrustedAdvisorCheckResult where
parseJSON :: Value -> Parser TrustedAdvisorCheckResult
parseJSON =
String
-> (Object -> Parser TrustedAdvisorCheckResult)
-> Value
-> Parser TrustedAdvisorCheckResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TrustedAdvisorCheckResult"
( \Object
x ->
Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail]
-> TrustedAdvisorCheckResult
TrustedAdvisorCheckResult'
(Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail]
-> TrustedAdvisorCheckResult)
-> Parser Text
-> Parser
(Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail]
-> TrustedAdvisorCheckResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"checkId")
Parser
(Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail]
-> TrustedAdvisorCheckResult)
-> Parser Text
-> Parser
(Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail]
-> TrustedAdvisorCheckResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"timestamp")
Parser
(Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail]
-> TrustedAdvisorCheckResult)
-> Parser Text
-> Parser
(TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail]
-> TrustedAdvisorCheckResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser
(TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail]
-> TrustedAdvisorCheckResult)
-> Parser TrustedAdvisorResourcesSummary
-> Parser
(TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail] -> TrustedAdvisorCheckResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser TrustedAdvisorResourcesSummary
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourcesSummary")
Parser
(TrustedAdvisorCategorySpecificSummary
-> [TrustedAdvisorResourceDetail] -> TrustedAdvisorCheckResult)
-> Parser TrustedAdvisorCategorySpecificSummary
-> Parser
([TrustedAdvisorResourceDetail] -> TrustedAdvisorCheckResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser TrustedAdvisorCategorySpecificSummary
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"categorySpecificSummary")
Parser
([TrustedAdvisorResourceDetail] -> TrustedAdvisorCheckResult)
-> Parser [TrustedAdvisorResourceDetail]
-> Parser TrustedAdvisorCheckResult
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe [TrustedAdvisorResourceDetail])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"flaggedResources"
Parser (Maybe [TrustedAdvisorResourceDetail])
-> [TrustedAdvisorResourceDetail]
-> Parser [TrustedAdvisorResourceDetail]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [TrustedAdvisorResourceDetail]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable TrustedAdvisorCheckResult
instance Prelude.NFData TrustedAdvisorCheckResult