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