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