{-# 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.ResourceGroupsTagging.Types.Summary 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
import Amazonka.ResourceGroupsTagging.Types.TargetIdType
data Summary = Summary'
{
Summary -> Maybe Text
lastUpdated :: Prelude.Maybe Prelude.Text,
Summary -> Maybe Integer
nonCompliantResources :: Prelude.Maybe Prelude.Integer,
Summary -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
Summary -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
Summary -> Maybe Text
targetId :: Prelude.Maybe Prelude.Text,
Summary -> Maybe TargetIdType
targetIdType :: Prelude.Maybe TargetIdType
}
deriving (Summary -> Summary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Summary -> Summary -> Bool
$c/= :: Summary -> Summary -> Bool
== :: Summary -> Summary -> Bool
$c== :: Summary -> Summary -> Bool
Prelude.Eq, ReadPrec [Summary]
ReadPrec Summary
Int -> ReadS Summary
ReadS [Summary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Summary]
$creadListPrec :: ReadPrec [Summary]
readPrec :: ReadPrec Summary
$creadPrec :: ReadPrec Summary
readList :: ReadS [Summary]
$creadList :: ReadS [Summary]
readsPrec :: Int -> ReadS Summary
$creadsPrec :: Int -> ReadS Summary
Prelude.Read, Int -> Summary -> ShowS
[Summary] -> ShowS
Summary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Summary] -> ShowS
$cshowList :: [Summary] -> ShowS
show :: Summary -> String
$cshow :: Summary -> String
showsPrec :: Int -> Summary -> ShowS
$cshowsPrec :: Int -> Summary -> ShowS
Prelude.Show, forall x. Rep Summary x -> Summary
forall x. Summary -> Rep Summary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Summary x -> Summary
$cfrom :: forall x. Summary -> Rep Summary x
Prelude.Generic)
newSummary ::
Summary
newSummary :: Summary
newSummary =
Summary'
{ $sel:lastUpdated:Summary' :: Maybe Text
lastUpdated = forall a. Maybe a
Prelude.Nothing,
$sel:nonCompliantResources:Summary' :: Maybe Integer
nonCompliantResources = forall a. Maybe a
Prelude.Nothing,
$sel:region:Summary' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:Summary' :: Maybe Text
resourceType = forall a. Maybe a
Prelude.Nothing,
$sel:targetId:Summary' :: Maybe Text
targetId = forall a. Maybe a
Prelude.Nothing,
$sel:targetIdType:Summary' :: Maybe TargetIdType
targetIdType = forall a. Maybe a
Prelude.Nothing
}
summary_lastUpdated :: Lens.Lens' Summary (Prelude.Maybe Prelude.Text)
summary_lastUpdated :: Lens' Summary (Maybe Text)
summary_lastUpdated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Summary' {Maybe Text
lastUpdated :: Maybe Text
$sel:lastUpdated:Summary' :: Summary -> Maybe Text
lastUpdated} -> Maybe Text
lastUpdated) (\s :: Summary
s@Summary' {} Maybe Text
a -> Summary
s {$sel:lastUpdated:Summary' :: Maybe Text
lastUpdated = Maybe Text
a} :: Summary)
summary_nonCompliantResources :: Lens.Lens' Summary (Prelude.Maybe Prelude.Integer)
summary_nonCompliantResources :: Lens' Summary (Maybe Integer)
summary_nonCompliantResources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Summary' {Maybe Integer
nonCompliantResources :: Maybe Integer
$sel:nonCompliantResources:Summary' :: Summary -> Maybe Integer
nonCompliantResources} -> Maybe Integer
nonCompliantResources) (\s :: Summary
s@Summary' {} Maybe Integer
a -> Summary
s {$sel:nonCompliantResources:Summary' :: Maybe Integer
nonCompliantResources = Maybe Integer
a} :: Summary)
summary_region :: Lens.Lens' Summary (Prelude.Maybe Prelude.Text)
summary_region :: Lens' Summary (Maybe Text)
summary_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Summary' {Maybe Text
region :: Maybe Text
$sel:region:Summary' :: Summary -> Maybe Text
region} -> Maybe Text
region) (\s :: Summary
s@Summary' {} Maybe Text
a -> Summary
s {$sel:region:Summary' :: Maybe Text
region = Maybe Text
a} :: Summary)
summary_resourceType :: Lens.Lens' Summary (Prelude.Maybe Prelude.Text)
summary_resourceType :: Lens' Summary (Maybe Text)
summary_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Summary' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:Summary' :: Summary -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: Summary
s@Summary' {} Maybe Text
a -> Summary
s {$sel:resourceType:Summary' :: Maybe Text
resourceType = Maybe Text
a} :: Summary)
summary_targetId :: Lens.Lens' Summary (Prelude.Maybe Prelude.Text)
summary_targetId :: Lens' Summary (Maybe Text)
summary_targetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Summary' {Maybe Text
targetId :: Maybe Text
$sel:targetId:Summary' :: Summary -> Maybe Text
targetId} -> Maybe Text
targetId) (\s :: Summary
s@Summary' {} Maybe Text
a -> Summary
s {$sel:targetId:Summary' :: Maybe Text
targetId = Maybe Text
a} :: Summary)
summary_targetIdType :: Lens.Lens' Summary (Prelude.Maybe TargetIdType)
summary_targetIdType :: Lens' Summary (Maybe TargetIdType)
summary_targetIdType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Summary' {Maybe TargetIdType
targetIdType :: Maybe TargetIdType
$sel:targetIdType:Summary' :: Summary -> Maybe TargetIdType
targetIdType} -> Maybe TargetIdType
targetIdType) (\s :: Summary
s@Summary' {} Maybe TargetIdType
a -> Summary
s {$sel:targetIdType:Summary' :: Maybe TargetIdType
targetIdType = Maybe TargetIdType
a} :: Summary)
instance Data.FromJSON Summary where
parseJSON :: Value -> Parser Summary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Summary"
( \Object
x ->
Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TargetIdType
-> Summary
Summary'
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
"LastUpdated")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NonCompliantResources")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Region")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResourceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TargetId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TargetIdType")
)
instance Prelude.Hashable Summary where
hashWithSalt :: Int -> Summary -> Int
hashWithSalt Int
_salt Summary' {Maybe Integer
Maybe Text
Maybe TargetIdType
targetIdType :: Maybe TargetIdType
targetId :: Maybe Text
resourceType :: Maybe Text
region :: Maybe Text
nonCompliantResources :: Maybe Integer
lastUpdated :: Maybe Text
$sel:targetIdType:Summary' :: Summary -> Maybe TargetIdType
$sel:targetId:Summary' :: Summary -> Maybe Text
$sel:resourceType:Summary' :: Summary -> Maybe Text
$sel:region:Summary' :: Summary -> Maybe Text
$sel:nonCompliantResources:Summary' :: Summary -> Maybe Integer
$sel:lastUpdated:Summary' :: Summary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastUpdated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
nonCompliantResources
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
targetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TargetIdType
targetIdType
instance Prelude.NFData Summary where
rnf :: Summary -> ()
rnf Summary' {Maybe Integer
Maybe Text
Maybe TargetIdType
targetIdType :: Maybe TargetIdType
targetId :: Maybe Text
resourceType :: Maybe Text
region :: Maybe Text
nonCompliantResources :: Maybe Integer
lastUpdated :: Maybe Text
$sel:targetIdType:Summary' :: Summary -> Maybe TargetIdType
$sel:targetId:Summary' :: Summary -> Maybe Text
$sel:resourceType:Summary' :: Summary -> Maybe Text
$sel:region:Summary' :: Summary -> Maybe Text
$sel:nonCompliantResources:Summary' :: Summary -> Maybe Integer
$sel:lastUpdated:Summary' :: Summary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastUpdated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
nonCompliantResources
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
targetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TargetIdType
targetIdType