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