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