{-# 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.TrustedAdvisorCheckSummary 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.TrustedAdvisorResourcesSummary
data TrustedAdvisorCheckSummary = TrustedAdvisorCheckSummary'
{
TrustedAdvisorCheckSummary -> Maybe Bool
hasFlaggedResources :: Prelude.Maybe Prelude.Bool,
TrustedAdvisorCheckSummary -> Text
checkId :: Prelude.Text,
TrustedAdvisorCheckSummary -> Text
timestamp :: Prelude.Text,
TrustedAdvisorCheckSummary -> Text
status :: Prelude.Text,
TrustedAdvisorCheckSummary -> TrustedAdvisorResourcesSummary
resourcesSummary :: TrustedAdvisorResourcesSummary,
TrustedAdvisorCheckSummary -> TrustedAdvisorCategorySpecificSummary
categorySpecificSummary :: TrustedAdvisorCategorySpecificSummary
}
deriving (TrustedAdvisorCheckSummary -> TrustedAdvisorCheckSummary -> Bool
(TrustedAdvisorCheckSummary -> TrustedAdvisorCheckSummary -> Bool)
-> (TrustedAdvisorCheckSummary
-> TrustedAdvisorCheckSummary -> Bool)
-> Eq TrustedAdvisorCheckSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrustedAdvisorCheckSummary -> TrustedAdvisorCheckSummary -> Bool
$c/= :: TrustedAdvisorCheckSummary -> TrustedAdvisorCheckSummary -> Bool
== :: TrustedAdvisorCheckSummary -> TrustedAdvisorCheckSummary -> Bool
$c== :: TrustedAdvisorCheckSummary -> TrustedAdvisorCheckSummary -> Bool
Prelude.Eq, ReadPrec [TrustedAdvisorCheckSummary]
ReadPrec TrustedAdvisorCheckSummary
Int -> ReadS TrustedAdvisorCheckSummary
ReadS [TrustedAdvisorCheckSummary]
(Int -> ReadS TrustedAdvisorCheckSummary)
-> ReadS [TrustedAdvisorCheckSummary]
-> ReadPrec TrustedAdvisorCheckSummary
-> ReadPrec [TrustedAdvisorCheckSummary]
-> Read TrustedAdvisorCheckSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrustedAdvisorCheckSummary]
$creadListPrec :: ReadPrec [TrustedAdvisorCheckSummary]
readPrec :: ReadPrec TrustedAdvisorCheckSummary
$creadPrec :: ReadPrec TrustedAdvisorCheckSummary
readList :: ReadS [TrustedAdvisorCheckSummary]
$creadList :: ReadS [TrustedAdvisorCheckSummary]
readsPrec :: Int -> ReadS TrustedAdvisorCheckSummary
$creadsPrec :: Int -> ReadS TrustedAdvisorCheckSummary
Prelude.Read, Int -> TrustedAdvisorCheckSummary -> ShowS
[TrustedAdvisorCheckSummary] -> ShowS
TrustedAdvisorCheckSummary -> String
(Int -> TrustedAdvisorCheckSummary -> ShowS)
-> (TrustedAdvisorCheckSummary -> String)
-> ([TrustedAdvisorCheckSummary] -> ShowS)
-> Show TrustedAdvisorCheckSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrustedAdvisorCheckSummary] -> ShowS
$cshowList :: [TrustedAdvisorCheckSummary] -> ShowS
show :: TrustedAdvisorCheckSummary -> String
$cshow :: TrustedAdvisorCheckSummary -> String
showsPrec :: Int -> TrustedAdvisorCheckSummary -> ShowS
$cshowsPrec :: Int -> TrustedAdvisorCheckSummary -> ShowS
Prelude.Show, (forall x.
TrustedAdvisorCheckSummary -> Rep TrustedAdvisorCheckSummary x)
-> (forall x.
Rep TrustedAdvisorCheckSummary x -> TrustedAdvisorCheckSummary)
-> Generic TrustedAdvisorCheckSummary
forall x.
Rep TrustedAdvisorCheckSummary x -> TrustedAdvisorCheckSummary
forall x.
TrustedAdvisorCheckSummary -> Rep TrustedAdvisorCheckSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrustedAdvisorCheckSummary x -> TrustedAdvisorCheckSummary
$cfrom :: forall x.
TrustedAdvisorCheckSummary -> Rep TrustedAdvisorCheckSummary x
Prelude.Generic)
newTrustedAdvisorCheckSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
TrustedAdvisorResourcesSummary ->
TrustedAdvisorCategorySpecificSummary ->
TrustedAdvisorCheckSummary
newTrustedAdvisorCheckSummary :: Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary
newTrustedAdvisorCheckSummary
Text
pCheckId_
Text
pTimestamp_
Text
pStatus_
TrustedAdvisorResourcesSummary
pResourcesSummary_
TrustedAdvisorCategorySpecificSummary
pCategorySpecificSummary_ =
TrustedAdvisorCheckSummary' :: Maybe Bool
-> Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary
TrustedAdvisorCheckSummary'
{ $sel:hasFlaggedResources:TrustedAdvisorCheckSummary' :: Maybe Bool
hasFlaggedResources =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:checkId:TrustedAdvisorCheckSummary' :: Text
checkId = Text
pCheckId_,
$sel:timestamp:TrustedAdvisorCheckSummary' :: Text
timestamp = Text
pTimestamp_,
$sel:status:TrustedAdvisorCheckSummary' :: Text
status = Text
pStatus_,
$sel:resourcesSummary:TrustedAdvisorCheckSummary' :: TrustedAdvisorResourcesSummary
resourcesSummary = TrustedAdvisorResourcesSummary
pResourcesSummary_,
$sel:categorySpecificSummary:TrustedAdvisorCheckSummary' :: TrustedAdvisorCategorySpecificSummary
categorySpecificSummary =
TrustedAdvisorCategorySpecificSummary
pCategorySpecificSummary_
}
trustedAdvisorCheckSummary_hasFlaggedResources :: Lens.Lens' TrustedAdvisorCheckSummary (Prelude.Maybe Prelude.Bool)
trustedAdvisorCheckSummary_hasFlaggedResources :: (Maybe Bool -> f (Maybe Bool))
-> TrustedAdvisorCheckSummary -> f TrustedAdvisorCheckSummary
trustedAdvisorCheckSummary_hasFlaggedResources = (TrustedAdvisorCheckSummary -> Maybe Bool)
-> (TrustedAdvisorCheckSummary
-> Maybe Bool -> TrustedAdvisorCheckSummary)
-> Lens
TrustedAdvisorCheckSummary
TrustedAdvisorCheckSummary
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckSummary' {Maybe Bool
hasFlaggedResources :: Maybe Bool
$sel:hasFlaggedResources:TrustedAdvisorCheckSummary' :: TrustedAdvisorCheckSummary -> Maybe Bool
hasFlaggedResources} -> Maybe Bool
hasFlaggedResources) (\s :: TrustedAdvisorCheckSummary
s@TrustedAdvisorCheckSummary' {} Maybe Bool
a -> TrustedAdvisorCheckSummary
s {$sel:hasFlaggedResources:TrustedAdvisorCheckSummary' :: Maybe Bool
hasFlaggedResources = Maybe Bool
a} :: TrustedAdvisorCheckSummary)
trustedAdvisorCheckSummary_checkId :: Lens.Lens' TrustedAdvisorCheckSummary Prelude.Text
trustedAdvisorCheckSummary_checkId :: (Text -> f Text)
-> TrustedAdvisorCheckSummary -> f TrustedAdvisorCheckSummary
trustedAdvisorCheckSummary_checkId = (TrustedAdvisorCheckSummary -> Text)
-> (TrustedAdvisorCheckSummary
-> Text -> TrustedAdvisorCheckSummary)
-> Lens
TrustedAdvisorCheckSummary TrustedAdvisorCheckSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckSummary' {Text
checkId :: Text
$sel:checkId:TrustedAdvisorCheckSummary' :: TrustedAdvisorCheckSummary -> Text
checkId} -> Text
checkId) (\s :: TrustedAdvisorCheckSummary
s@TrustedAdvisorCheckSummary' {} Text
a -> TrustedAdvisorCheckSummary
s {$sel:checkId:TrustedAdvisorCheckSummary' :: Text
checkId = Text
a} :: TrustedAdvisorCheckSummary)
trustedAdvisorCheckSummary_timestamp :: Lens.Lens' TrustedAdvisorCheckSummary Prelude.Text
trustedAdvisorCheckSummary_timestamp :: (Text -> f Text)
-> TrustedAdvisorCheckSummary -> f TrustedAdvisorCheckSummary
trustedAdvisorCheckSummary_timestamp = (TrustedAdvisorCheckSummary -> Text)
-> (TrustedAdvisorCheckSummary
-> Text -> TrustedAdvisorCheckSummary)
-> Lens
TrustedAdvisorCheckSummary TrustedAdvisorCheckSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckSummary' {Text
timestamp :: Text
$sel:timestamp:TrustedAdvisorCheckSummary' :: TrustedAdvisorCheckSummary -> Text
timestamp} -> Text
timestamp) (\s :: TrustedAdvisorCheckSummary
s@TrustedAdvisorCheckSummary' {} Text
a -> TrustedAdvisorCheckSummary
s {$sel:timestamp:TrustedAdvisorCheckSummary' :: Text
timestamp = Text
a} :: TrustedAdvisorCheckSummary)
trustedAdvisorCheckSummary_status :: Lens.Lens' TrustedAdvisorCheckSummary Prelude.Text
trustedAdvisorCheckSummary_status :: (Text -> f Text)
-> TrustedAdvisorCheckSummary -> f TrustedAdvisorCheckSummary
trustedAdvisorCheckSummary_status = (TrustedAdvisorCheckSummary -> Text)
-> (TrustedAdvisorCheckSummary
-> Text -> TrustedAdvisorCheckSummary)
-> Lens
TrustedAdvisorCheckSummary TrustedAdvisorCheckSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckSummary' {Text
status :: Text
$sel:status:TrustedAdvisorCheckSummary' :: TrustedAdvisorCheckSummary -> Text
status} -> Text
status) (\s :: TrustedAdvisorCheckSummary
s@TrustedAdvisorCheckSummary' {} Text
a -> TrustedAdvisorCheckSummary
s {$sel:status:TrustedAdvisorCheckSummary' :: Text
status = Text
a} :: TrustedAdvisorCheckSummary)
trustedAdvisorCheckSummary_resourcesSummary :: Lens.Lens' TrustedAdvisorCheckSummary TrustedAdvisorResourcesSummary
trustedAdvisorCheckSummary_resourcesSummary :: (TrustedAdvisorResourcesSummary
-> f TrustedAdvisorResourcesSummary)
-> TrustedAdvisorCheckSummary -> f TrustedAdvisorCheckSummary
trustedAdvisorCheckSummary_resourcesSummary = (TrustedAdvisorCheckSummary -> TrustedAdvisorResourcesSummary)
-> (TrustedAdvisorCheckSummary
-> TrustedAdvisorResourcesSummary -> TrustedAdvisorCheckSummary)
-> Lens
TrustedAdvisorCheckSummary
TrustedAdvisorCheckSummary
TrustedAdvisorResourcesSummary
TrustedAdvisorResourcesSummary
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckSummary' {TrustedAdvisorResourcesSummary
resourcesSummary :: TrustedAdvisorResourcesSummary
$sel:resourcesSummary:TrustedAdvisorCheckSummary' :: TrustedAdvisorCheckSummary -> TrustedAdvisorResourcesSummary
resourcesSummary} -> TrustedAdvisorResourcesSummary
resourcesSummary) (\s :: TrustedAdvisorCheckSummary
s@TrustedAdvisorCheckSummary' {} TrustedAdvisorResourcesSummary
a -> TrustedAdvisorCheckSummary
s {$sel:resourcesSummary:TrustedAdvisorCheckSummary' :: TrustedAdvisorResourcesSummary
resourcesSummary = TrustedAdvisorResourcesSummary
a} :: TrustedAdvisorCheckSummary)
trustedAdvisorCheckSummary_categorySpecificSummary :: Lens.Lens' TrustedAdvisorCheckSummary TrustedAdvisorCategorySpecificSummary
trustedAdvisorCheckSummary_categorySpecificSummary :: (TrustedAdvisorCategorySpecificSummary
-> f TrustedAdvisorCategorySpecificSummary)
-> TrustedAdvisorCheckSummary -> f TrustedAdvisorCheckSummary
trustedAdvisorCheckSummary_categorySpecificSummary = (TrustedAdvisorCheckSummary
-> TrustedAdvisorCategorySpecificSummary)
-> (TrustedAdvisorCheckSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary)
-> Lens
TrustedAdvisorCheckSummary
TrustedAdvisorCheckSummary
TrustedAdvisorCategorySpecificSummary
TrustedAdvisorCategorySpecificSummary
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckSummary' {TrustedAdvisorCategorySpecificSummary
categorySpecificSummary :: TrustedAdvisorCategorySpecificSummary
$sel:categorySpecificSummary:TrustedAdvisorCheckSummary' :: TrustedAdvisorCheckSummary -> TrustedAdvisorCategorySpecificSummary
categorySpecificSummary} -> TrustedAdvisorCategorySpecificSummary
categorySpecificSummary) (\s :: TrustedAdvisorCheckSummary
s@TrustedAdvisorCheckSummary' {} TrustedAdvisorCategorySpecificSummary
a -> TrustedAdvisorCheckSummary
s {$sel:categorySpecificSummary:TrustedAdvisorCheckSummary' :: TrustedAdvisorCategorySpecificSummary
categorySpecificSummary = TrustedAdvisorCategorySpecificSummary
a} :: TrustedAdvisorCheckSummary)
instance Core.FromJSON TrustedAdvisorCheckSummary where
parseJSON :: Value -> Parser TrustedAdvisorCheckSummary
parseJSON =
String
-> (Object -> Parser TrustedAdvisorCheckSummary)
-> Value
-> Parser TrustedAdvisorCheckSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TrustedAdvisorCheckSummary"
( \Object
x ->
Maybe Bool
-> Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary
TrustedAdvisorCheckSummary'
(Maybe Bool
-> Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary)
-> Parser (Maybe Bool)
-> Parser
(Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hasFlaggedResources")
Parser
(Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary)
-> Parser Text
-> Parser
(Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary)
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
"checkId")
Parser
(Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary)
-> Parser Text
-> Parser
(Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary)
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
-> TrustedAdvisorCheckSummary)
-> Parser Text
-> Parser
(TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary)
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
-> TrustedAdvisorCheckSummary)
-> Parser TrustedAdvisorResourcesSummary
-> Parser
(TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary)
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
-> TrustedAdvisorCheckSummary)
-> Parser TrustedAdvisorCategorySpecificSummary
-> Parser TrustedAdvisorCheckSummary
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")
)
instance Prelude.Hashable TrustedAdvisorCheckSummary
instance Prelude.NFData TrustedAdvisorCheckSummary