{-# 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.VirtualRouterRef where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VirtualRouterRef = VirtualRouterRef'
{
VirtualRouterRef -> Text
arn :: Prelude.Text,
VirtualRouterRef -> POSIX
createdAt :: Core.POSIX,
VirtualRouterRef -> POSIX
lastUpdatedAt :: Core.POSIX,
VirtualRouterRef -> Text
meshName :: Prelude.Text,
VirtualRouterRef -> Text
meshOwner :: Prelude.Text,
VirtualRouterRef -> Text
resourceOwner :: Prelude.Text,
VirtualRouterRef -> Integer
version :: Prelude.Integer,
VirtualRouterRef -> Text
virtualRouterName :: Prelude.Text
}
deriving (VirtualRouterRef -> VirtualRouterRef -> Bool
(VirtualRouterRef -> VirtualRouterRef -> Bool)
-> (VirtualRouterRef -> VirtualRouterRef -> Bool)
-> Eq VirtualRouterRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VirtualRouterRef -> VirtualRouterRef -> Bool
$c/= :: VirtualRouterRef -> VirtualRouterRef -> Bool
== :: VirtualRouterRef -> VirtualRouterRef -> Bool
$c== :: VirtualRouterRef -> VirtualRouterRef -> Bool
Prelude.Eq, ReadPrec [VirtualRouterRef]
ReadPrec VirtualRouterRef
Int -> ReadS VirtualRouterRef
ReadS [VirtualRouterRef]
(Int -> ReadS VirtualRouterRef)
-> ReadS [VirtualRouterRef]
-> ReadPrec VirtualRouterRef
-> ReadPrec [VirtualRouterRef]
-> Read VirtualRouterRef
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VirtualRouterRef]
$creadListPrec :: ReadPrec [VirtualRouterRef]
readPrec :: ReadPrec VirtualRouterRef
$creadPrec :: ReadPrec VirtualRouterRef
readList :: ReadS [VirtualRouterRef]
$creadList :: ReadS [VirtualRouterRef]
readsPrec :: Int -> ReadS VirtualRouterRef
$creadsPrec :: Int -> ReadS VirtualRouterRef
Prelude.Read, Int -> VirtualRouterRef -> ShowS
[VirtualRouterRef] -> ShowS
VirtualRouterRef -> String
(Int -> VirtualRouterRef -> ShowS)
-> (VirtualRouterRef -> String)
-> ([VirtualRouterRef] -> ShowS)
-> Show VirtualRouterRef
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VirtualRouterRef] -> ShowS
$cshowList :: [VirtualRouterRef] -> ShowS
show :: VirtualRouterRef -> String
$cshow :: VirtualRouterRef -> String
showsPrec :: Int -> VirtualRouterRef -> ShowS
$cshowsPrec :: Int -> VirtualRouterRef -> ShowS
Prelude.Show, (forall x. VirtualRouterRef -> Rep VirtualRouterRef x)
-> (forall x. Rep VirtualRouterRef x -> VirtualRouterRef)
-> Generic VirtualRouterRef
forall x. Rep VirtualRouterRef x -> VirtualRouterRef
forall x. VirtualRouterRef -> Rep VirtualRouterRef x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VirtualRouterRef x -> VirtualRouterRef
$cfrom :: forall x. VirtualRouterRef -> Rep VirtualRouterRef x
Prelude.Generic)
newVirtualRouterRef ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Integer ->
Prelude.Text ->
VirtualRouterRef
newVirtualRouterRef :: Text
-> UTCTime
-> UTCTime
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualRouterRef
newVirtualRouterRef
Text
pArn_
UTCTime
pCreatedAt_
UTCTime
pLastUpdatedAt_
Text
pMeshName_
Text
pMeshOwner_
Text
pResourceOwner_
Integer
pVersion_
Text
pVirtualRouterName_ =
VirtualRouterRef' :: Text
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualRouterRef
VirtualRouterRef'
{ $sel:arn:VirtualRouterRef' :: Text
arn = Text
pArn_,
$sel:createdAt:VirtualRouterRef' :: 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:VirtualRouterRef' :: 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:VirtualRouterRef' :: Text
meshName = Text
pMeshName_,
$sel:meshOwner:VirtualRouterRef' :: Text
meshOwner = Text
pMeshOwner_,
$sel:resourceOwner:VirtualRouterRef' :: Text
resourceOwner = Text
pResourceOwner_,
$sel:version:VirtualRouterRef' :: Integer
version = Integer
pVersion_,
$sel:virtualRouterName:VirtualRouterRef' :: Text
virtualRouterName = Text
pVirtualRouterName_
}
virtualRouterRef_arn :: Lens.Lens' VirtualRouterRef Prelude.Text
virtualRouterRef_arn :: (Text -> f Text) -> VirtualRouterRef -> f VirtualRouterRef
virtualRouterRef_arn = (VirtualRouterRef -> Text)
-> (VirtualRouterRef -> Text -> VirtualRouterRef)
-> Lens VirtualRouterRef VirtualRouterRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualRouterRef' {Text
arn :: Text
$sel:arn:VirtualRouterRef' :: VirtualRouterRef -> Text
arn} -> Text
arn) (\s :: VirtualRouterRef
s@VirtualRouterRef' {} Text
a -> VirtualRouterRef
s {$sel:arn:VirtualRouterRef' :: Text
arn = Text
a} :: VirtualRouterRef)
virtualRouterRef_createdAt :: Lens.Lens' VirtualRouterRef Prelude.UTCTime
virtualRouterRef_createdAt :: (UTCTime -> f UTCTime) -> VirtualRouterRef -> f VirtualRouterRef
virtualRouterRef_createdAt = (VirtualRouterRef -> POSIX)
-> (VirtualRouterRef -> POSIX -> VirtualRouterRef)
-> Lens VirtualRouterRef VirtualRouterRef POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualRouterRef' {POSIX
createdAt :: POSIX
$sel:createdAt:VirtualRouterRef' :: VirtualRouterRef -> POSIX
createdAt} -> POSIX
createdAt) (\s :: VirtualRouterRef
s@VirtualRouterRef' {} POSIX
a -> VirtualRouterRef
s {$sel:createdAt:VirtualRouterRef' :: POSIX
createdAt = POSIX
a} :: VirtualRouterRef) ((POSIX -> f POSIX) -> VirtualRouterRef -> f VirtualRouterRef)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> VirtualRouterRef
-> f VirtualRouterRef
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
virtualRouterRef_lastUpdatedAt :: Lens.Lens' VirtualRouterRef Prelude.UTCTime
virtualRouterRef_lastUpdatedAt :: (UTCTime -> f UTCTime) -> VirtualRouterRef -> f VirtualRouterRef
virtualRouterRef_lastUpdatedAt = (VirtualRouterRef -> POSIX)
-> (VirtualRouterRef -> POSIX -> VirtualRouterRef)
-> Lens VirtualRouterRef VirtualRouterRef POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualRouterRef' {POSIX
lastUpdatedAt :: POSIX
$sel:lastUpdatedAt:VirtualRouterRef' :: VirtualRouterRef -> POSIX
lastUpdatedAt} -> POSIX
lastUpdatedAt) (\s :: VirtualRouterRef
s@VirtualRouterRef' {} POSIX
a -> VirtualRouterRef
s {$sel:lastUpdatedAt:VirtualRouterRef' :: POSIX
lastUpdatedAt = POSIX
a} :: VirtualRouterRef) ((POSIX -> f POSIX) -> VirtualRouterRef -> f VirtualRouterRef)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> VirtualRouterRef
-> f VirtualRouterRef
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
virtualRouterRef_meshName :: Lens.Lens' VirtualRouterRef Prelude.Text
virtualRouterRef_meshName :: (Text -> f Text) -> VirtualRouterRef -> f VirtualRouterRef
virtualRouterRef_meshName = (VirtualRouterRef -> Text)
-> (VirtualRouterRef -> Text -> VirtualRouterRef)
-> Lens VirtualRouterRef VirtualRouterRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualRouterRef' {Text
meshName :: Text
$sel:meshName:VirtualRouterRef' :: VirtualRouterRef -> Text
meshName} -> Text
meshName) (\s :: VirtualRouterRef
s@VirtualRouterRef' {} Text
a -> VirtualRouterRef
s {$sel:meshName:VirtualRouterRef' :: Text
meshName = Text
a} :: VirtualRouterRef)
virtualRouterRef_meshOwner :: Lens.Lens' VirtualRouterRef Prelude.Text
virtualRouterRef_meshOwner :: (Text -> f Text) -> VirtualRouterRef -> f VirtualRouterRef
virtualRouterRef_meshOwner = (VirtualRouterRef -> Text)
-> (VirtualRouterRef -> Text -> VirtualRouterRef)
-> Lens VirtualRouterRef VirtualRouterRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualRouterRef' {Text
meshOwner :: Text
$sel:meshOwner:VirtualRouterRef' :: VirtualRouterRef -> Text
meshOwner} -> Text
meshOwner) (\s :: VirtualRouterRef
s@VirtualRouterRef' {} Text
a -> VirtualRouterRef
s {$sel:meshOwner:VirtualRouterRef' :: Text
meshOwner = Text
a} :: VirtualRouterRef)
virtualRouterRef_resourceOwner :: Lens.Lens' VirtualRouterRef Prelude.Text
virtualRouterRef_resourceOwner :: (Text -> f Text) -> VirtualRouterRef -> f VirtualRouterRef
virtualRouterRef_resourceOwner = (VirtualRouterRef -> Text)
-> (VirtualRouterRef -> Text -> VirtualRouterRef)
-> Lens VirtualRouterRef VirtualRouterRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualRouterRef' {Text
resourceOwner :: Text
$sel:resourceOwner:VirtualRouterRef' :: VirtualRouterRef -> Text
resourceOwner} -> Text
resourceOwner) (\s :: VirtualRouterRef
s@VirtualRouterRef' {} Text
a -> VirtualRouterRef
s {$sel:resourceOwner:VirtualRouterRef' :: Text
resourceOwner = Text
a} :: VirtualRouterRef)
virtualRouterRef_version :: Lens.Lens' VirtualRouterRef Prelude.Integer
virtualRouterRef_version :: (Integer -> f Integer) -> VirtualRouterRef -> f VirtualRouterRef
virtualRouterRef_version = (VirtualRouterRef -> Integer)
-> (VirtualRouterRef -> Integer -> VirtualRouterRef)
-> Lens VirtualRouterRef VirtualRouterRef Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualRouterRef' {Integer
version :: Integer
$sel:version:VirtualRouterRef' :: VirtualRouterRef -> Integer
version} -> Integer
version) (\s :: VirtualRouterRef
s@VirtualRouterRef' {} Integer
a -> VirtualRouterRef
s {$sel:version:VirtualRouterRef' :: Integer
version = Integer
a} :: VirtualRouterRef)
virtualRouterRef_virtualRouterName :: Lens.Lens' VirtualRouterRef Prelude.Text
virtualRouterRef_virtualRouterName :: (Text -> f Text) -> VirtualRouterRef -> f VirtualRouterRef
virtualRouterRef_virtualRouterName = (VirtualRouterRef -> Text)
-> (VirtualRouterRef -> Text -> VirtualRouterRef)
-> Lens VirtualRouterRef VirtualRouterRef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualRouterRef' {Text
virtualRouterName :: Text
$sel:virtualRouterName:VirtualRouterRef' :: VirtualRouterRef -> Text
virtualRouterName} -> Text
virtualRouterName) (\s :: VirtualRouterRef
s@VirtualRouterRef' {} Text
a -> VirtualRouterRef
s {$sel:virtualRouterName:VirtualRouterRef' :: Text
virtualRouterName = Text
a} :: VirtualRouterRef)
instance Core.FromJSON VirtualRouterRef where
parseJSON :: Value -> Parser VirtualRouterRef
parseJSON =
String
-> (Object -> Parser VirtualRouterRef)
-> Value
-> Parser VirtualRouterRef
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VirtualRouterRef"
( \Object
x ->
Text
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualRouterRef
VirtualRouterRef'
(Text
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualRouterRef)
-> Parser Text
-> Parser
(POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualRouterRef)
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
-> VirtualRouterRef)
-> Parser POSIX
-> Parser
(POSIX
-> Text -> Text -> Text -> Integer -> Text -> VirtualRouterRef)
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 -> VirtualRouterRef)
-> Parser POSIX
-> Parser
(Text -> Text -> Text -> Integer -> Text -> VirtualRouterRef)
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 -> VirtualRouterRef)
-> Parser Text
-> Parser (Text -> Text -> Integer -> Text -> VirtualRouterRef)
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 -> VirtualRouterRef)
-> Parser Text
-> Parser (Text -> Integer -> Text -> VirtualRouterRef)
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 -> VirtualRouterRef)
-> Parser Text -> Parser (Integer -> Text -> VirtualRouterRef)
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 -> VirtualRouterRef)
-> Parser Integer -> Parser (Text -> VirtualRouterRef)
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 -> VirtualRouterRef)
-> Parser Text -> Parser VirtualRouterRef
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
"virtualRouterName")
)
instance Prelude.Hashable VirtualRouterRef
instance Prelude.NFData VirtualRouterRef