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