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