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