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