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