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