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