{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data VirtualServiceRef = VirtualServiceRef'
{
VirtualServiceRef -> Text
arn :: Prelude.Text,
VirtualServiceRef -> POSIX
createdAt :: Data.POSIX,
VirtualServiceRef -> POSIX
lastUpdatedAt :: Data.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
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]
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
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. 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'
{ $sel:arn:VirtualServiceRef' :: Text
arn = Text
pArn_,
$sel:createdAt:VirtualServiceRef' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:lastUpdatedAt:VirtualServiceRef' :: POSIX
lastUpdatedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time 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 :: Lens' VirtualServiceRef Text
virtualServiceRef_arn = 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 :: Lens' VirtualServiceRef UTCTime
virtualServiceRef_createdAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
virtualServiceRef_lastUpdatedAt :: Lens.Lens' VirtualServiceRef Prelude.UTCTime
virtualServiceRef_lastUpdatedAt :: Lens' VirtualServiceRef UTCTime
virtualServiceRef_lastUpdatedAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
virtualServiceRef_meshName :: Lens.Lens' VirtualServiceRef Prelude.Text
virtualServiceRef_meshName :: Lens' VirtualServiceRef Text
virtualServiceRef_meshName = 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 :: Lens' VirtualServiceRef Text
virtualServiceRef_meshOwner = 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 :: Lens' VirtualServiceRef Text
virtualServiceRef_resourceOwner = 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 :: Lens' VirtualServiceRef Integer
virtualServiceRef_version = 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 :: Lens' VirtualServiceRef Text
virtualServiceRef_virtualServiceName = 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 Data.FromJSON VirtualServiceRef where
parseJSON :: Value -> Parser VirtualServiceRef
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VirtualServiceRef"
( \Object
x ->
Text
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Integer
-> Text
-> VirtualServiceRef
VirtualServiceRef'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"createdAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"lastUpdatedAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"meshName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"meshOwner")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourceOwner")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"version")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"virtualServiceName")
)
instance Prelude.Hashable VirtualServiceRef where
hashWithSalt :: Int -> VirtualServiceRef -> Int
hashWithSalt Int
_salt VirtualServiceRef' {Integer
Text
POSIX
virtualServiceName :: Text
version :: Integer
resourceOwner :: Text
meshOwner :: Text
meshName :: Text
lastUpdatedAt :: POSIX
createdAt :: POSIX
arn :: Text
$sel:virtualServiceName:VirtualServiceRef' :: VirtualServiceRef -> Text
$sel:version:VirtualServiceRef' :: VirtualServiceRef -> Integer
$sel:resourceOwner:VirtualServiceRef' :: VirtualServiceRef -> Text
$sel:meshOwner:VirtualServiceRef' :: VirtualServiceRef -> Text
$sel:meshName:VirtualServiceRef' :: VirtualServiceRef -> Text
$sel:lastUpdatedAt:VirtualServiceRef' :: VirtualServiceRef -> POSIX
$sel:createdAt:VirtualServiceRef' :: VirtualServiceRef -> POSIX
$sel:arn:VirtualServiceRef' :: VirtualServiceRef -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastUpdatedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
meshName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
meshOwner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceOwner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
version
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
virtualServiceName
instance Prelude.NFData VirtualServiceRef where
rnf :: VirtualServiceRef -> ()
rnf VirtualServiceRef' {Integer
Text
POSIX
virtualServiceName :: Text
version :: Integer
resourceOwner :: Text
meshOwner :: Text
meshName :: Text
lastUpdatedAt :: POSIX
createdAt :: POSIX
arn :: Text
$sel:virtualServiceName:VirtualServiceRef' :: VirtualServiceRef -> Text
$sel:version:VirtualServiceRef' :: VirtualServiceRef -> Integer
$sel:resourceOwner:VirtualServiceRef' :: VirtualServiceRef -> Text
$sel:meshOwner:VirtualServiceRef' :: VirtualServiceRef -> Text
$sel:meshName:VirtualServiceRef' :: VirtualServiceRef -> Text
$sel:lastUpdatedAt:VirtualServiceRef' :: VirtualServiceRef -> POSIX
$sel:createdAt:VirtualServiceRef' :: VirtualServiceRef -> POSIX
$sel:arn:VirtualServiceRef' :: VirtualServiceRef -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastUpdatedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
meshName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
meshOwner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceOwner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
version
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
virtualServiceName