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