{-# 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.VirtualNodeData where
import Amazonka.AppMesh.Types.ResourceMetadata
import Amazonka.AppMesh.Types.VirtualNodeSpec
import Amazonka.AppMesh.Types.VirtualNodeStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VirtualNodeData = VirtualNodeData'
{
VirtualNodeData -> Text
meshName :: Prelude.Text,
VirtualNodeData -> ResourceMetadata
metadata :: ResourceMetadata,
VirtualNodeData -> VirtualNodeSpec
spec :: VirtualNodeSpec,
VirtualNodeData -> VirtualNodeStatus
status :: VirtualNodeStatus,
VirtualNodeData -> Text
virtualNodeName :: Prelude.Text
}
deriving (VirtualNodeData -> VirtualNodeData -> Bool
(VirtualNodeData -> VirtualNodeData -> Bool)
-> (VirtualNodeData -> VirtualNodeData -> Bool)
-> Eq VirtualNodeData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VirtualNodeData -> VirtualNodeData -> Bool
$c/= :: VirtualNodeData -> VirtualNodeData -> Bool
== :: VirtualNodeData -> VirtualNodeData -> Bool
$c== :: VirtualNodeData -> VirtualNodeData -> Bool
Prelude.Eq, ReadPrec [VirtualNodeData]
ReadPrec VirtualNodeData
Int -> ReadS VirtualNodeData
ReadS [VirtualNodeData]
(Int -> ReadS VirtualNodeData)
-> ReadS [VirtualNodeData]
-> ReadPrec VirtualNodeData
-> ReadPrec [VirtualNodeData]
-> Read VirtualNodeData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VirtualNodeData]
$creadListPrec :: ReadPrec [VirtualNodeData]
readPrec :: ReadPrec VirtualNodeData
$creadPrec :: ReadPrec VirtualNodeData
readList :: ReadS [VirtualNodeData]
$creadList :: ReadS [VirtualNodeData]
readsPrec :: Int -> ReadS VirtualNodeData
$creadsPrec :: Int -> ReadS VirtualNodeData
Prelude.Read, Int -> VirtualNodeData -> ShowS
[VirtualNodeData] -> ShowS
VirtualNodeData -> String
(Int -> VirtualNodeData -> ShowS)
-> (VirtualNodeData -> String)
-> ([VirtualNodeData] -> ShowS)
-> Show VirtualNodeData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VirtualNodeData] -> ShowS
$cshowList :: [VirtualNodeData] -> ShowS
show :: VirtualNodeData -> String
$cshow :: VirtualNodeData -> String
showsPrec :: Int -> VirtualNodeData -> ShowS
$cshowsPrec :: Int -> VirtualNodeData -> ShowS
Prelude.Show, (forall x. VirtualNodeData -> Rep VirtualNodeData x)
-> (forall x. Rep VirtualNodeData x -> VirtualNodeData)
-> Generic VirtualNodeData
forall x. Rep VirtualNodeData x -> VirtualNodeData
forall x. VirtualNodeData -> Rep VirtualNodeData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VirtualNodeData x -> VirtualNodeData
$cfrom :: forall x. VirtualNodeData -> Rep VirtualNodeData x
Prelude.Generic)
newVirtualNodeData ::
Prelude.Text ->
ResourceMetadata ->
VirtualNodeSpec ->
VirtualNodeStatus ->
Prelude.Text ->
VirtualNodeData
newVirtualNodeData :: Text
-> ResourceMetadata
-> VirtualNodeSpec
-> VirtualNodeStatus
-> Text
-> VirtualNodeData
newVirtualNodeData
Text
pMeshName_
ResourceMetadata
pMetadata_
VirtualNodeSpec
pSpec_
VirtualNodeStatus
pStatus_
Text
pVirtualNodeName_ =
VirtualNodeData' :: Text
-> ResourceMetadata
-> VirtualNodeSpec
-> VirtualNodeStatus
-> Text
-> VirtualNodeData
VirtualNodeData'
{ $sel:meshName:VirtualNodeData' :: Text
meshName = Text
pMeshName_,
$sel:metadata:VirtualNodeData' :: ResourceMetadata
metadata = ResourceMetadata
pMetadata_,
$sel:spec:VirtualNodeData' :: VirtualNodeSpec
spec = VirtualNodeSpec
pSpec_,
$sel:status:VirtualNodeData' :: VirtualNodeStatus
status = VirtualNodeStatus
pStatus_,
$sel:virtualNodeName:VirtualNodeData' :: Text
virtualNodeName = Text
pVirtualNodeName_
}
virtualNodeData_meshName :: Lens.Lens' VirtualNodeData Prelude.Text
virtualNodeData_meshName :: (Text -> f Text) -> VirtualNodeData -> f VirtualNodeData
virtualNodeData_meshName = (VirtualNodeData -> Text)
-> (VirtualNodeData -> Text -> VirtualNodeData)
-> Lens VirtualNodeData VirtualNodeData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeData' {Text
meshName :: Text
$sel:meshName:VirtualNodeData' :: VirtualNodeData -> Text
meshName} -> Text
meshName) (\s :: VirtualNodeData
s@VirtualNodeData' {} Text
a -> VirtualNodeData
s {$sel:meshName:VirtualNodeData' :: Text
meshName = Text
a} :: VirtualNodeData)
virtualNodeData_metadata :: Lens.Lens' VirtualNodeData ResourceMetadata
virtualNodeData_metadata :: (ResourceMetadata -> f ResourceMetadata)
-> VirtualNodeData -> f VirtualNodeData
virtualNodeData_metadata = (VirtualNodeData -> ResourceMetadata)
-> (VirtualNodeData -> ResourceMetadata -> VirtualNodeData)
-> Lens
VirtualNodeData VirtualNodeData ResourceMetadata ResourceMetadata
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeData' {ResourceMetadata
metadata :: ResourceMetadata
$sel:metadata:VirtualNodeData' :: VirtualNodeData -> ResourceMetadata
metadata} -> ResourceMetadata
metadata) (\s :: VirtualNodeData
s@VirtualNodeData' {} ResourceMetadata
a -> VirtualNodeData
s {$sel:metadata:VirtualNodeData' :: ResourceMetadata
metadata = ResourceMetadata
a} :: VirtualNodeData)
virtualNodeData_spec :: Lens.Lens' VirtualNodeData VirtualNodeSpec
virtualNodeData_spec :: (VirtualNodeSpec -> f VirtualNodeSpec)
-> VirtualNodeData -> f VirtualNodeData
virtualNodeData_spec = (VirtualNodeData -> VirtualNodeSpec)
-> (VirtualNodeData -> VirtualNodeSpec -> VirtualNodeData)
-> Lens
VirtualNodeData VirtualNodeData VirtualNodeSpec VirtualNodeSpec
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeData' {VirtualNodeSpec
spec :: VirtualNodeSpec
$sel:spec:VirtualNodeData' :: VirtualNodeData -> VirtualNodeSpec
spec} -> VirtualNodeSpec
spec) (\s :: VirtualNodeData
s@VirtualNodeData' {} VirtualNodeSpec
a -> VirtualNodeData
s {$sel:spec:VirtualNodeData' :: VirtualNodeSpec
spec = VirtualNodeSpec
a} :: VirtualNodeData)
virtualNodeData_status :: Lens.Lens' VirtualNodeData VirtualNodeStatus
virtualNodeData_status :: (VirtualNodeStatus -> f VirtualNodeStatus)
-> VirtualNodeData -> f VirtualNodeData
virtualNodeData_status = (VirtualNodeData -> VirtualNodeStatus)
-> (VirtualNodeData -> VirtualNodeStatus -> VirtualNodeData)
-> Lens
VirtualNodeData VirtualNodeData VirtualNodeStatus VirtualNodeStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeData' {VirtualNodeStatus
status :: VirtualNodeStatus
$sel:status:VirtualNodeData' :: VirtualNodeData -> VirtualNodeStatus
status} -> VirtualNodeStatus
status) (\s :: VirtualNodeData
s@VirtualNodeData' {} VirtualNodeStatus
a -> VirtualNodeData
s {$sel:status:VirtualNodeData' :: VirtualNodeStatus
status = VirtualNodeStatus
a} :: VirtualNodeData)
virtualNodeData_virtualNodeName :: Lens.Lens' VirtualNodeData Prelude.Text
virtualNodeData_virtualNodeName :: (Text -> f Text) -> VirtualNodeData -> f VirtualNodeData
virtualNodeData_virtualNodeName = (VirtualNodeData -> Text)
-> (VirtualNodeData -> Text -> VirtualNodeData)
-> Lens VirtualNodeData VirtualNodeData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualNodeData' {Text
virtualNodeName :: Text
$sel:virtualNodeName:VirtualNodeData' :: VirtualNodeData -> Text
virtualNodeName} -> Text
virtualNodeName) (\s :: VirtualNodeData
s@VirtualNodeData' {} Text
a -> VirtualNodeData
s {$sel:virtualNodeName:VirtualNodeData' :: Text
virtualNodeName = Text
a} :: VirtualNodeData)
instance Core.FromJSON VirtualNodeData where
parseJSON :: Value -> Parser VirtualNodeData
parseJSON =
String
-> (Object -> Parser VirtualNodeData)
-> Value
-> Parser VirtualNodeData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VirtualNodeData"
( \Object
x ->
Text
-> ResourceMetadata
-> VirtualNodeSpec
-> VirtualNodeStatus
-> Text
-> VirtualNodeData
VirtualNodeData'
(Text
-> ResourceMetadata
-> VirtualNodeSpec
-> VirtualNodeStatus
-> Text
-> VirtualNodeData)
-> Parser Text
-> Parser
(ResourceMetadata
-> VirtualNodeSpec -> VirtualNodeStatus -> Text -> VirtualNodeData)
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
"meshName")
Parser
(ResourceMetadata
-> VirtualNodeSpec -> VirtualNodeStatus -> Text -> VirtualNodeData)
-> Parser ResourceMetadata
-> Parser
(VirtualNodeSpec -> VirtualNodeStatus -> Text -> VirtualNodeData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ResourceMetadata
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"metadata")
Parser
(VirtualNodeSpec -> VirtualNodeStatus -> Text -> VirtualNodeData)
-> Parser VirtualNodeSpec
-> Parser (VirtualNodeStatus -> Text -> VirtualNodeData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser VirtualNodeSpec
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"spec")
Parser (VirtualNodeStatus -> Text -> VirtualNodeData)
-> Parser VirtualNodeStatus -> Parser (Text -> VirtualNodeData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser VirtualNodeStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (Text -> VirtualNodeData)
-> Parser Text -> Parser VirtualNodeData
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
"virtualNodeName")
)
instance Prelude.Hashable VirtualNodeData
instance Prelude.NFData VirtualNodeData