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