{-# 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.Panorama.Types.NodeInstance where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Panorama.Types.NodeInstanceStatus
import qualified Amazonka.Prelude as Prelude
data NodeInstance = NodeInstance'
{
NodeInstance -> Maybe Text
nodeId :: Prelude.Maybe Prelude.Text,
NodeInstance -> Maybe Text
nodeName :: Prelude.Maybe Prelude.Text,
NodeInstance -> Maybe Text
packageName :: Prelude.Maybe Prelude.Text,
NodeInstance -> Maybe Text
packagePatchVersion :: Prelude.Maybe Prelude.Text,
NodeInstance -> Maybe Text
packageVersion :: Prelude.Maybe Prelude.Text,
NodeInstance -> NodeInstanceStatus
currentStatus :: NodeInstanceStatus,
NodeInstance -> Text
nodeInstanceId :: Prelude.Text
}
deriving (NodeInstance -> NodeInstance -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeInstance -> NodeInstance -> Bool
$c/= :: NodeInstance -> NodeInstance -> Bool
== :: NodeInstance -> NodeInstance -> Bool
$c== :: NodeInstance -> NodeInstance -> Bool
Prelude.Eq, ReadPrec [NodeInstance]
ReadPrec NodeInstance
Int -> ReadS NodeInstance
ReadS [NodeInstance]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeInstance]
$creadListPrec :: ReadPrec [NodeInstance]
readPrec :: ReadPrec NodeInstance
$creadPrec :: ReadPrec NodeInstance
readList :: ReadS [NodeInstance]
$creadList :: ReadS [NodeInstance]
readsPrec :: Int -> ReadS NodeInstance
$creadsPrec :: Int -> ReadS NodeInstance
Prelude.Read, Int -> NodeInstance -> ShowS
[NodeInstance] -> ShowS
NodeInstance -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeInstance] -> ShowS
$cshowList :: [NodeInstance] -> ShowS
show :: NodeInstance -> String
$cshow :: NodeInstance -> String
showsPrec :: Int -> NodeInstance -> ShowS
$cshowsPrec :: Int -> NodeInstance -> ShowS
Prelude.Show, forall x. Rep NodeInstance x -> NodeInstance
forall x. NodeInstance -> Rep NodeInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodeInstance x -> NodeInstance
$cfrom :: forall x. NodeInstance -> Rep NodeInstance x
Prelude.Generic)
newNodeInstance ::
NodeInstanceStatus ->
Prelude.Text ->
NodeInstance
newNodeInstance :: NodeInstanceStatus -> Text -> NodeInstance
newNodeInstance NodeInstanceStatus
pCurrentStatus_ Text
pNodeInstanceId_ =
NodeInstance'
{ $sel:nodeId:NodeInstance' :: Maybe Text
nodeId = forall a. Maybe a
Prelude.Nothing,
$sel:nodeName:NodeInstance' :: Maybe Text
nodeName = forall a. Maybe a
Prelude.Nothing,
$sel:packageName:NodeInstance' :: Maybe Text
packageName = forall a. Maybe a
Prelude.Nothing,
$sel:packagePatchVersion:NodeInstance' :: Maybe Text
packagePatchVersion = forall a. Maybe a
Prelude.Nothing,
$sel:packageVersion:NodeInstance' :: Maybe Text
packageVersion = forall a. Maybe a
Prelude.Nothing,
$sel:currentStatus:NodeInstance' :: NodeInstanceStatus
currentStatus = NodeInstanceStatus
pCurrentStatus_,
$sel:nodeInstanceId:NodeInstance' :: Text
nodeInstanceId = Text
pNodeInstanceId_
}
nodeInstance_nodeId :: Lens.Lens' NodeInstance (Prelude.Maybe Prelude.Text)
nodeInstance_nodeId :: Lens' NodeInstance (Maybe Text)
nodeInstance_nodeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeInstance' {Maybe Text
nodeId :: Maybe Text
$sel:nodeId:NodeInstance' :: NodeInstance -> Maybe Text
nodeId} -> Maybe Text
nodeId) (\s :: NodeInstance
s@NodeInstance' {} Maybe Text
a -> NodeInstance
s {$sel:nodeId:NodeInstance' :: Maybe Text
nodeId = Maybe Text
a} :: NodeInstance)
nodeInstance_nodeName :: Lens.Lens' NodeInstance (Prelude.Maybe Prelude.Text)
nodeInstance_nodeName :: Lens' NodeInstance (Maybe Text)
nodeInstance_nodeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeInstance' {Maybe Text
nodeName :: Maybe Text
$sel:nodeName:NodeInstance' :: NodeInstance -> Maybe Text
nodeName} -> Maybe Text
nodeName) (\s :: NodeInstance
s@NodeInstance' {} Maybe Text
a -> NodeInstance
s {$sel:nodeName:NodeInstance' :: Maybe Text
nodeName = Maybe Text
a} :: NodeInstance)
nodeInstance_packageName :: Lens.Lens' NodeInstance (Prelude.Maybe Prelude.Text)
nodeInstance_packageName :: Lens' NodeInstance (Maybe Text)
nodeInstance_packageName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeInstance' {Maybe Text
packageName :: Maybe Text
$sel:packageName:NodeInstance' :: NodeInstance -> Maybe Text
packageName} -> Maybe Text
packageName) (\s :: NodeInstance
s@NodeInstance' {} Maybe Text
a -> NodeInstance
s {$sel:packageName:NodeInstance' :: Maybe Text
packageName = Maybe Text
a} :: NodeInstance)
nodeInstance_packagePatchVersion :: Lens.Lens' NodeInstance (Prelude.Maybe Prelude.Text)
nodeInstance_packagePatchVersion :: Lens' NodeInstance (Maybe Text)
nodeInstance_packagePatchVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeInstance' {Maybe Text
packagePatchVersion :: Maybe Text
$sel:packagePatchVersion:NodeInstance' :: NodeInstance -> Maybe Text
packagePatchVersion} -> Maybe Text
packagePatchVersion) (\s :: NodeInstance
s@NodeInstance' {} Maybe Text
a -> NodeInstance
s {$sel:packagePatchVersion:NodeInstance' :: Maybe Text
packagePatchVersion = Maybe Text
a} :: NodeInstance)
nodeInstance_packageVersion :: Lens.Lens' NodeInstance (Prelude.Maybe Prelude.Text)
nodeInstance_packageVersion :: Lens' NodeInstance (Maybe Text)
nodeInstance_packageVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeInstance' {Maybe Text
packageVersion :: Maybe Text
$sel:packageVersion:NodeInstance' :: NodeInstance -> Maybe Text
packageVersion} -> Maybe Text
packageVersion) (\s :: NodeInstance
s@NodeInstance' {} Maybe Text
a -> NodeInstance
s {$sel:packageVersion:NodeInstance' :: Maybe Text
packageVersion = Maybe Text
a} :: NodeInstance)
nodeInstance_currentStatus :: Lens.Lens' NodeInstance NodeInstanceStatus
nodeInstance_currentStatus :: Lens' NodeInstance NodeInstanceStatus
nodeInstance_currentStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeInstance' {NodeInstanceStatus
currentStatus :: NodeInstanceStatus
$sel:currentStatus:NodeInstance' :: NodeInstance -> NodeInstanceStatus
currentStatus} -> NodeInstanceStatus
currentStatus) (\s :: NodeInstance
s@NodeInstance' {} NodeInstanceStatus
a -> NodeInstance
s {$sel:currentStatus:NodeInstance' :: NodeInstanceStatus
currentStatus = NodeInstanceStatus
a} :: NodeInstance)
nodeInstance_nodeInstanceId :: Lens.Lens' NodeInstance Prelude.Text
nodeInstance_nodeInstanceId :: Lens' NodeInstance Text
nodeInstance_nodeInstanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeInstance' {Text
nodeInstanceId :: Text
$sel:nodeInstanceId:NodeInstance' :: NodeInstance -> Text
nodeInstanceId} -> Text
nodeInstanceId) (\s :: NodeInstance
s@NodeInstance' {} Text
a -> NodeInstance
s {$sel:nodeInstanceId:NodeInstance' :: Text
nodeInstanceId = Text
a} :: NodeInstance)
instance Data.FromJSON NodeInstance where
parseJSON :: Value -> Parser NodeInstance
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"NodeInstance"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NodeInstanceStatus
-> Text
-> NodeInstance
NodeInstance'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NodeId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NodeName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PackageName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PackagePatchVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PackageVersion")
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
"CurrentStatus")
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
"NodeInstanceId")
)
instance Prelude.Hashable NodeInstance where
hashWithSalt :: Int -> NodeInstance -> Int
hashWithSalt Int
_salt NodeInstance' {Maybe Text
Text
NodeInstanceStatus
nodeInstanceId :: Text
currentStatus :: NodeInstanceStatus
packageVersion :: Maybe Text
packagePatchVersion :: Maybe Text
packageName :: Maybe Text
nodeName :: Maybe Text
nodeId :: Maybe Text
$sel:nodeInstanceId:NodeInstance' :: NodeInstance -> Text
$sel:currentStatus:NodeInstance' :: NodeInstance -> NodeInstanceStatus
$sel:packageVersion:NodeInstance' :: NodeInstance -> Maybe Text
$sel:packagePatchVersion:NodeInstance' :: NodeInstance -> Maybe Text
$sel:packageName:NodeInstance' :: NodeInstance -> Maybe Text
$sel:nodeName:NodeInstance' :: NodeInstance -> Maybe Text
$sel:nodeId:NodeInstance' :: NodeInstance -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nodeId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nodeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
packageName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
packagePatchVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
packageVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NodeInstanceStatus
currentStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
nodeInstanceId
instance Prelude.NFData NodeInstance where
rnf :: NodeInstance -> ()
rnf NodeInstance' {Maybe Text
Text
NodeInstanceStatus
nodeInstanceId :: Text
currentStatus :: NodeInstanceStatus
packageVersion :: Maybe Text
packagePatchVersion :: Maybe Text
packageName :: Maybe Text
nodeName :: Maybe Text
nodeId :: Maybe Text
$sel:nodeInstanceId:NodeInstance' :: NodeInstance -> Text
$sel:currentStatus:NodeInstance' :: NodeInstance -> NodeInstanceStatus
$sel:packageVersion:NodeInstance' :: NodeInstance -> Maybe Text
$sel:packagePatchVersion:NodeInstance' :: NodeInstance -> Maybe Text
$sel:packageName:NodeInstance' :: NodeInstance -> Maybe Text
$sel:nodeName:NodeInstance' :: NodeInstance -> Maybe Text
$sel:nodeId:NodeInstance' :: NodeInstance -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nodeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nodeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
packageName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
packagePatchVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
packageVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NodeInstanceStatus
currentStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
nodeInstanceId