{-# 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.AccessAnalyzer.Types.AnalyzedResourceSummary where
import Amazonka.AccessAnalyzer.Types.ResourceType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AnalyzedResourceSummary = AnalyzedResourceSummary'
{
AnalyzedResourceSummary -> Text
resourceArn :: Prelude.Text,
AnalyzedResourceSummary -> Text
resourceOwnerAccount :: Prelude.Text,
AnalyzedResourceSummary -> ResourceType
resourceType :: ResourceType
}
deriving (AnalyzedResourceSummary -> AnalyzedResourceSummary -> Bool
(AnalyzedResourceSummary -> AnalyzedResourceSummary -> Bool)
-> (AnalyzedResourceSummary -> AnalyzedResourceSummary -> Bool)
-> Eq AnalyzedResourceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnalyzedResourceSummary -> AnalyzedResourceSummary -> Bool
$c/= :: AnalyzedResourceSummary -> AnalyzedResourceSummary -> Bool
== :: AnalyzedResourceSummary -> AnalyzedResourceSummary -> Bool
$c== :: AnalyzedResourceSummary -> AnalyzedResourceSummary -> Bool
Prelude.Eq, ReadPrec [AnalyzedResourceSummary]
ReadPrec AnalyzedResourceSummary
Int -> ReadS AnalyzedResourceSummary
ReadS [AnalyzedResourceSummary]
(Int -> ReadS AnalyzedResourceSummary)
-> ReadS [AnalyzedResourceSummary]
-> ReadPrec AnalyzedResourceSummary
-> ReadPrec [AnalyzedResourceSummary]
-> Read AnalyzedResourceSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnalyzedResourceSummary]
$creadListPrec :: ReadPrec [AnalyzedResourceSummary]
readPrec :: ReadPrec AnalyzedResourceSummary
$creadPrec :: ReadPrec AnalyzedResourceSummary
readList :: ReadS [AnalyzedResourceSummary]
$creadList :: ReadS [AnalyzedResourceSummary]
readsPrec :: Int -> ReadS AnalyzedResourceSummary
$creadsPrec :: Int -> ReadS AnalyzedResourceSummary
Prelude.Read, Int -> AnalyzedResourceSummary -> ShowS
[AnalyzedResourceSummary] -> ShowS
AnalyzedResourceSummary -> String
(Int -> AnalyzedResourceSummary -> ShowS)
-> (AnalyzedResourceSummary -> String)
-> ([AnalyzedResourceSummary] -> ShowS)
-> Show AnalyzedResourceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnalyzedResourceSummary] -> ShowS
$cshowList :: [AnalyzedResourceSummary] -> ShowS
show :: AnalyzedResourceSummary -> String
$cshow :: AnalyzedResourceSummary -> String
showsPrec :: Int -> AnalyzedResourceSummary -> ShowS
$cshowsPrec :: Int -> AnalyzedResourceSummary -> ShowS
Prelude.Show, (forall x.
AnalyzedResourceSummary -> Rep AnalyzedResourceSummary x)
-> (forall x.
Rep AnalyzedResourceSummary x -> AnalyzedResourceSummary)
-> Generic AnalyzedResourceSummary
forall x. Rep AnalyzedResourceSummary x -> AnalyzedResourceSummary
forall x. AnalyzedResourceSummary -> Rep AnalyzedResourceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AnalyzedResourceSummary x -> AnalyzedResourceSummary
$cfrom :: forall x. AnalyzedResourceSummary -> Rep AnalyzedResourceSummary x
Prelude.Generic)
newAnalyzedResourceSummary ::
Prelude.Text ->
Prelude.Text ->
ResourceType ->
AnalyzedResourceSummary
newAnalyzedResourceSummary :: Text -> Text -> ResourceType -> AnalyzedResourceSummary
newAnalyzedResourceSummary
Text
pResourceArn_
Text
pResourceOwnerAccount_
ResourceType
pResourceType_ =
AnalyzedResourceSummary' :: Text -> Text -> ResourceType -> AnalyzedResourceSummary
AnalyzedResourceSummary'
{ $sel:resourceArn:AnalyzedResourceSummary' :: Text
resourceArn =
Text
pResourceArn_,
$sel:resourceOwnerAccount:AnalyzedResourceSummary' :: Text
resourceOwnerAccount = Text
pResourceOwnerAccount_,
$sel:resourceType:AnalyzedResourceSummary' :: ResourceType
resourceType = ResourceType
pResourceType_
}
analyzedResourceSummary_resourceArn :: Lens.Lens' AnalyzedResourceSummary Prelude.Text
analyzedResourceSummary_resourceArn :: (Text -> f Text)
-> AnalyzedResourceSummary -> f AnalyzedResourceSummary
analyzedResourceSummary_resourceArn = (AnalyzedResourceSummary -> Text)
-> (AnalyzedResourceSummary -> Text -> AnalyzedResourceSummary)
-> Lens AnalyzedResourceSummary AnalyzedResourceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzedResourceSummary' {Text
resourceArn :: Text
$sel:resourceArn:AnalyzedResourceSummary' :: AnalyzedResourceSummary -> Text
resourceArn} -> Text
resourceArn) (\s :: AnalyzedResourceSummary
s@AnalyzedResourceSummary' {} Text
a -> AnalyzedResourceSummary
s {$sel:resourceArn:AnalyzedResourceSummary' :: Text
resourceArn = Text
a} :: AnalyzedResourceSummary)
analyzedResourceSummary_resourceOwnerAccount :: Lens.Lens' AnalyzedResourceSummary Prelude.Text
analyzedResourceSummary_resourceOwnerAccount :: (Text -> f Text)
-> AnalyzedResourceSummary -> f AnalyzedResourceSummary
analyzedResourceSummary_resourceOwnerAccount = (AnalyzedResourceSummary -> Text)
-> (AnalyzedResourceSummary -> Text -> AnalyzedResourceSummary)
-> Lens AnalyzedResourceSummary AnalyzedResourceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzedResourceSummary' {Text
resourceOwnerAccount :: Text
$sel:resourceOwnerAccount:AnalyzedResourceSummary' :: AnalyzedResourceSummary -> Text
resourceOwnerAccount} -> Text
resourceOwnerAccount) (\s :: AnalyzedResourceSummary
s@AnalyzedResourceSummary' {} Text
a -> AnalyzedResourceSummary
s {$sel:resourceOwnerAccount:AnalyzedResourceSummary' :: Text
resourceOwnerAccount = Text
a} :: AnalyzedResourceSummary)
analyzedResourceSummary_resourceType :: Lens.Lens' AnalyzedResourceSummary ResourceType
analyzedResourceSummary_resourceType :: (ResourceType -> f ResourceType)
-> AnalyzedResourceSummary -> f AnalyzedResourceSummary
analyzedResourceSummary_resourceType = (AnalyzedResourceSummary -> ResourceType)
-> (AnalyzedResourceSummary
-> ResourceType -> AnalyzedResourceSummary)
-> Lens
AnalyzedResourceSummary
AnalyzedResourceSummary
ResourceType
ResourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzedResourceSummary' {ResourceType
resourceType :: ResourceType
$sel:resourceType:AnalyzedResourceSummary' :: AnalyzedResourceSummary -> ResourceType
resourceType} -> ResourceType
resourceType) (\s :: AnalyzedResourceSummary
s@AnalyzedResourceSummary' {} ResourceType
a -> AnalyzedResourceSummary
s {$sel:resourceType:AnalyzedResourceSummary' :: ResourceType
resourceType = ResourceType
a} :: AnalyzedResourceSummary)
instance Core.FromJSON AnalyzedResourceSummary where
parseJSON :: Value -> Parser AnalyzedResourceSummary
parseJSON =
String
-> (Object -> Parser AnalyzedResourceSummary)
-> Value
-> Parser AnalyzedResourceSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AnalyzedResourceSummary"
( \Object
x ->
Text -> Text -> ResourceType -> AnalyzedResourceSummary
AnalyzedResourceSummary'
(Text -> Text -> ResourceType -> AnalyzedResourceSummary)
-> Parser Text
-> Parser (Text -> ResourceType -> AnalyzedResourceSummary)
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
"resourceArn")
Parser (Text -> ResourceType -> AnalyzedResourceSummary)
-> Parser Text -> Parser (ResourceType -> AnalyzedResourceSummary)
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
"resourceOwnerAccount")
Parser (ResourceType -> AnalyzedResourceSummary)
-> Parser ResourceType -> Parser AnalyzedResourceSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ResourceType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourceType")
)
instance Prelude.Hashable AnalyzedResourceSummary
instance Prelude.NFData AnalyzedResourceSummary