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