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