{-# 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.AppMesh.Types.VirtualNodeRef where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VirtualNodeRef = VirtualNodeRef'
{
VirtualNodeRef -> Text
arn :: Prelude.Text,
VirtualNodeRef -> POSIX
createdAt :: Core.POSIX,
VirtualNodeRef -> POSIX
lastUpdatedAt :: Core.POSIX,
VirtualNodeRef -> Text
meshName :: Prelude.Text,
VirtualNodeRef -> Text
meshOwner :: Prelude.Text,
VirtualNodeRef -> Text
resourceOwner :: Prelude.Text,
VirtualNodeRef -> Integer
version :: Prelude.Integer,
VirtualNodeRef -> Text
virtualNodeName :: Prelude.Text
}
deriving (VirtualNodeRef -> VirtualNodeRef -> Bool
(VirtualNodeRef -> VirtualNodeRef -> Bool)
-> (VirtualNodeRef -> VirtualNodeRef -> Bool) -> Eq VirtualNodeRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VirtualNodeRef -> VirtualNodeRef -> Bool
$c/= :: VirtualNodeRef -> VirtualNodeRef -> Bool
== :: VirtualNodeRef -> VirtualNodeRef -> Bool
$c== :: VirtualNodeRef -> VirtualNodeRef -> Bool
Prelude.Eq, ReadPrec [VirtualNodeRef]
ReadPrec VirtualNodeRef
Int -> ReadS VirtualNodeRef
ReadS [VirtualNodeRef]
(Int -> ReadS VirtualNodeRef)
-> ReadS [VirtualNodeRef]
-> ReadPrec VirtualNodeRef
-> ReadPrec [VirtualNodeRef]
-> Read VirtualNodeRef
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VirtualNodeRef]
$creadListPrec :: ReadPrec [VirtualNodeRef]
readPrec :: ReadPrec VirtualNodeRef
$creadPrec :: ReadPrec VirtualNodeRef
readList :: ReadS [VirtualNodeRef]
$creadList :: ReadS [VirtualNodeRef]
readsPrec :: Int -> ReadS VirtualNodeRef
$creadsPrec :: Int -> ReadS VirtualNodeRef
Prelude.Read, Int -> VirtualNodeRef -> ShowS
[VirtualNodeRef] -> ShowS
VirtualNodeRef -> String
(Int -> VirtualNodeRef -> ShowS)
-> (VirtualNodeRef -> String)
-> ([VirtualNodeRef] -> ShowS)
-> Show VirtualNodeRef
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VirtualNodeRef] -> ShowS
$cshowList :: [VirtualNodeRef] -> ShowS
show :: VirtualNodeRef -> String
$cshow :: VirtualNodeRef -> String
showsPrec :: Int -> VirtualNodeRef -> ShowS
$cshowsPrec :: Int -> VirtualNodeRef -> ShowS
Prelude.Show, (forall x. VirtualNodeRef -> Rep VirtualNodeRef x)
-> (forall x. Rep VirtualNodeRef x -> VirtualNodeRef)
-> Generic VirtualNodeRef
forall x. Rep VirtualNodeRef x -> VirtualNodeRef
forall x. VirtualNodeRef -> Rep VirtualNodeRef x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VirtualNodeRef x -> VirtualNodeRef
$cfrom :: forall x. VirtualNodeRef -> Rep VirtualNodeRef x
Prelude.Generic)
newVirtualNodeRef ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Integer ->
Prelude.Text ->
VirtualNodeRef
newVirtualNodeRef :: Text
-> UTCTime
-> UTCTime
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualNodeRef
newVirtualNodeRef
Text
pArn_
UTCTime
pCreatedAt_
UTCTime
pLastUpdatedAt_
Text
pMeshName_
Text
pMeshOwner_
Text
pResourceOwner_
Integer
pVersion_
Text
pVirtualNodeName_ =
VirtualNodeRef' :: Text
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualNodeRef
VirtualNodeRef'
{ $sel:arn:VirtualNodeRef' :: Text
arn = Text
pArn_,
$sel:createdAt:VirtualNodeRef' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:lastUpdatedAt:VirtualNodeRef' :: POSIX
lastUpdatedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdatedAt_,
$sel:meshName:VirtualNodeRef' :: Text
meshName = Text
pMeshName_,
$sel:meshOwner:VirtualNodeRef' :: Text
meshOwner = Text
pMeshOwner_,
$sel:resourceOwner:VirtualNodeRef' :: Text
resourceOwner = Text
pResourceOwner_,
$sel:version:VirtualNodeRef' :: Integer
version = Integer
pVersion_,
$sel:virtualNodeName:VirtualNodeRef' :: Text
virtualNodeName = Text
pVirtualNodeName_
}
virtualNodeRef_arn :: Lens.Lens' VirtualNodeRef Prelude.Text
virtualNodeRef_arn :: (Text -> f Text) -> VirtualNodeRef -> f VirtualNodeRef
virtualNodeRef_arn = (VirtualNodeRef -> Text)
-> (VirtualNodeRef -> Text -> VirtualNodeRef)
-> Lens VirtualNodeRef VirtualNodeRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeRef' {Text
arn :: Text
$sel:arn:VirtualNodeRef' :: VirtualNodeRef -> Text
arn} -> Text
arn) (\s :: VirtualNodeRef
s@VirtualNodeRef' {} Text
a -> VirtualNodeRef
s {$sel:arn:VirtualNodeRef' :: Text
arn = Text
a} :: VirtualNodeRef)
virtualNodeRef_createdAt :: Lens.Lens' VirtualNodeRef Prelude.UTCTime
virtualNodeRef_createdAt :: (UTCTime -> f UTCTime) -> VirtualNodeRef -> f VirtualNodeRef
virtualNodeRef_createdAt = (VirtualNodeRef -> POSIX)
-> (VirtualNodeRef -> POSIX -> VirtualNodeRef)
-> Lens VirtualNodeRef VirtualNodeRef POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeRef' {POSIX
createdAt :: POSIX
$sel:createdAt:VirtualNodeRef' :: VirtualNodeRef -> POSIX
createdAt} -> POSIX
createdAt) (\s :: VirtualNodeRef
s@VirtualNodeRef' {} POSIX
a -> VirtualNodeRef
s {$sel:createdAt:VirtualNodeRef' :: POSIX
createdAt = POSIX
a} :: VirtualNodeRef) ((POSIX -> f POSIX) -> VirtualNodeRef -> f VirtualNodeRef)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> VirtualNodeRef
-> f VirtualNodeRef
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
virtualNodeRef_lastUpdatedAt :: Lens.Lens' VirtualNodeRef Prelude.UTCTime
virtualNodeRef_lastUpdatedAt :: (UTCTime -> f UTCTime) -> VirtualNodeRef -> f VirtualNodeRef
virtualNodeRef_lastUpdatedAt = (VirtualNodeRef -> POSIX)
-> (VirtualNodeRef -> POSIX -> VirtualNodeRef)
-> Lens VirtualNodeRef VirtualNodeRef POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeRef' {POSIX
lastUpdatedAt :: POSIX
$sel:lastUpdatedAt:VirtualNodeRef' :: VirtualNodeRef -> POSIX
lastUpdatedAt} -> POSIX
lastUpdatedAt) (\s :: VirtualNodeRef
s@VirtualNodeRef' {} POSIX
a -> VirtualNodeRef
s {$sel:lastUpdatedAt:VirtualNodeRef' :: POSIX
lastUpdatedAt = POSIX
a} :: VirtualNodeRef) ((POSIX -> f POSIX) -> VirtualNodeRef -> f VirtualNodeRef)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> VirtualNodeRef
-> f VirtualNodeRef
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
virtualNodeRef_meshName :: Lens.Lens' VirtualNodeRef Prelude.Text
virtualNodeRef_meshName :: (Text -> f Text) -> VirtualNodeRef -> f VirtualNodeRef
virtualNodeRef_meshName = (VirtualNodeRef -> Text)
-> (VirtualNodeRef -> Text -> VirtualNodeRef)
-> Lens VirtualNodeRef VirtualNodeRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeRef' {Text
meshName :: Text
$sel:meshName:VirtualNodeRef' :: VirtualNodeRef -> Text
meshName} -> Text
meshName) (\s :: VirtualNodeRef
s@VirtualNodeRef' {} Text
a -> VirtualNodeRef
s {$sel:meshName:VirtualNodeRef' :: Text
meshName = Text
a} :: VirtualNodeRef)
virtualNodeRef_meshOwner :: Lens.Lens' VirtualNodeRef Prelude.Text
virtualNodeRef_meshOwner :: (Text -> f Text) -> VirtualNodeRef -> f VirtualNodeRef
virtualNodeRef_meshOwner = (VirtualNodeRef -> Text)
-> (VirtualNodeRef -> Text -> VirtualNodeRef)
-> Lens VirtualNodeRef VirtualNodeRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeRef' {Text
meshOwner :: Text
$sel:meshOwner:VirtualNodeRef' :: VirtualNodeRef -> Text
meshOwner} -> Text
meshOwner) (\s :: VirtualNodeRef
s@VirtualNodeRef' {} Text
a -> VirtualNodeRef
s {$sel:meshOwner:VirtualNodeRef' :: Text
meshOwner = Text
a} :: VirtualNodeRef)
virtualNodeRef_resourceOwner :: Lens.Lens' VirtualNodeRef Prelude.Text
virtualNodeRef_resourceOwner :: (Text -> f Text) -> VirtualNodeRef -> f VirtualNodeRef
virtualNodeRef_resourceOwner = (VirtualNodeRef -> Text)
-> (VirtualNodeRef -> Text -> VirtualNodeRef)
-> Lens VirtualNodeRef VirtualNodeRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeRef' {Text
resourceOwner :: Text
$sel:resourceOwner:VirtualNodeRef' :: VirtualNodeRef -> Text
resourceOwner} -> Text
resourceOwner) (\s :: VirtualNodeRef
s@VirtualNodeRef' {} Text
a -> VirtualNodeRef
s {$sel:resourceOwner:VirtualNodeRef' :: Text
resourceOwner = Text
a} :: VirtualNodeRef)
virtualNodeRef_version :: Lens.Lens' VirtualNodeRef Prelude.Integer
virtualNodeRef_version :: (Integer -> f Integer) -> VirtualNodeRef -> f VirtualNodeRef
virtualNodeRef_version = (VirtualNodeRef -> Integer)
-> (VirtualNodeRef -> Integer -> VirtualNodeRef)
-> Lens VirtualNodeRef VirtualNodeRef Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeRef' {Integer
version :: Integer
$sel:version:VirtualNodeRef' :: VirtualNodeRef -> Integer
version} -> Integer
version) (\s :: VirtualNodeRef
s@VirtualNodeRef' {} Integer
a -> VirtualNodeRef
s {$sel:version:VirtualNodeRef' :: Integer
version = Integer
a} :: VirtualNodeRef)
virtualNodeRef_virtualNodeName :: Lens.Lens' VirtualNodeRef Prelude.Text
virtualNodeRef_virtualNodeName :: (Text -> f Text) -> VirtualNodeRef -> f VirtualNodeRef
virtualNodeRef_virtualNodeName = (VirtualNodeRef -> Text)
-> (VirtualNodeRef -> Text -> VirtualNodeRef)
-> Lens VirtualNodeRef VirtualNodeRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeRef' {Text
virtualNodeName :: Text
$sel:virtualNodeName:VirtualNodeRef' :: VirtualNodeRef -> Text
virtualNodeName} -> Text
virtualNodeName) (\s :: VirtualNodeRef
s@VirtualNodeRef' {} Text
a -> VirtualNodeRef
s {$sel:virtualNodeName:VirtualNodeRef' :: Text
virtualNodeName = Text
a} :: VirtualNodeRef)
instance Core.FromJSON VirtualNodeRef where
parseJSON :: Value -> Parser VirtualNodeRef
parseJSON =
String
-> (Object -> Parser VirtualNodeRef)
-> Value
-> Parser VirtualNodeRef
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VirtualNodeRef"
( \Object
x ->
Text
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualNodeRef
VirtualNodeRef'
(Text
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualNodeRef)
-> Parser Text
-> Parser
(POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualNodeRef)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"arn")
Parser
(POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualNodeRef)
-> Parser POSIX
-> Parser
(POSIX
-> Text -> Text -> Text -> Integer -> Text -> VirtualNodeRef)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createdAt")
Parser
(POSIX
-> Text -> Text -> Text -> Integer -> Text -> VirtualNodeRef)
-> Parser POSIX
-> Parser
(Text -> Text -> Text -> Integer -> Text -> VirtualNodeRef)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"lastUpdatedAt")
Parser (Text -> Text -> Text -> Integer -> Text -> VirtualNodeRef)
-> Parser Text
-> Parser (Text -> Text -> Integer -> Text -> VirtualNodeRef)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"meshName")
Parser (Text -> Text -> Integer -> Text -> VirtualNodeRef)
-> Parser Text
-> Parser (Text -> Integer -> Text -> VirtualNodeRef)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"meshOwner")
Parser (Text -> Integer -> Text -> VirtualNodeRef)
-> Parser Text -> Parser (Integer -> Text -> VirtualNodeRef)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourceOwner")
Parser (Integer -> Text -> VirtualNodeRef)
-> Parser Integer -> Parser (Text -> VirtualNodeRef)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"version")
Parser (Text -> VirtualNodeRef)
-> Parser Text -> Parser VirtualNodeRef
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"virtualNodeName")
)
instance Prelude.Hashable VirtualNodeRef
instance Prelude.NFData VirtualNodeRef