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