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