{-# 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.WorkSpaces.Types.TerminateRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TerminateRequest = TerminateRequest'
{
TerminateRequest -> Text
workspaceId :: Prelude.Text
}
deriving (TerminateRequest -> TerminateRequest -> Bool
(TerminateRequest -> TerminateRequest -> Bool)
-> (TerminateRequest -> TerminateRequest -> Bool)
-> Eq TerminateRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TerminateRequest -> TerminateRequest -> Bool
$c/= :: TerminateRequest -> TerminateRequest -> Bool
== :: TerminateRequest -> TerminateRequest -> Bool
$c== :: TerminateRequest -> TerminateRequest -> Bool
Prelude.Eq, ReadPrec [TerminateRequest]
ReadPrec TerminateRequest
Int -> ReadS TerminateRequest
ReadS [TerminateRequest]
(Int -> ReadS TerminateRequest)
-> ReadS [TerminateRequest]
-> ReadPrec TerminateRequest
-> ReadPrec [TerminateRequest]
-> Read TerminateRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TerminateRequest]
$creadListPrec :: ReadPrec [TerminateRequest]
readPrec :: ReadPrec TerminateRequest
$creadPrec :: ReadPrec TerminateRequest
readList :: ReadS [TerminateRequest]
$creadList :: ReadS [TerminateRequest]
readsPrec :: Int -> ReadS TerminateRequest
$creadsPrec :: Int -> ReadS TerminateRequest
Prelude.Read, Int -> TerminateRequest -> ShowS
[TerminateRequest] -> ShowS
TerminateRequest -> String
(Int -> TerminateRequest -> ShowS)
-> (TerminateRequest -> String)
-> ([TerminateRequest] -> ShowS)
-> Show TerminateRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TerminateRequest] -> ShowS
$cshowList :: [TerminateRequest] -> ShowS
show :: TerminateRequest -> String
$cshow :: TerminateRequest -> String
showsPrec :: Int -> TerminateRequest -> ShowS
$cshowsPrec :: Int -> TerminateRequest -> ShowS
Prelude.Show, (forall x. TerminateRequest -> Rep TerminateRequest x)
-> (forall x. Rep TerminateRequest x -> TerminateRequest)
-> Generic TerminateRequest
forall x. Rep TerminateRequest x -> TerminateRequest
forall x. TerminateRequest -> Rep TerminateRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TerminateRequest x -> TerminateRequest
$cfrom :: forall x. TerminateRequest -> Rep TerminateRequest x
Prelude.Generic)
newTerminateRequest ::
Prelude.Text ->
TerminateRequest
newTerminateRequest :: Text -> TerminateRequest
newTerminateRequest Text
pWorkspaceId_ =
TerminateRequest' :: Text -> TerminateRequest
TerminateRequest' {$sel:workspaceId:TerminateRequest' :: Text
workspaceId = Text
pWorkspaceId_}
terminateRequest_workspaceId :: Lens.Lens' TerminateRequest Prelude.Text
terminateRequest_workspaceId :: (Text -> f Text) -> TerminateRequest -> f TerminateRequest
terminateRequest_workspaceId = (TerminateRequest -> Text)
-> (TerminateRequest -> Text -> TerminateRequest)
-> Lens TerminateRequest TerminateRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TerminateRequest' {Text
workspaceId :: Text
$sel:workspaceId:TerminateRequest' :: TerminateRequest -> Text
workspaceId} -> Text
workspaceId) (\s :: TerminateRequest
s@TerminateRequest' {} Text
a -> TerminateRequest
s {$sel:workspaceId:TerminateRequest' :: Text
workspaceId = Text
a} :: TerminateRequest)
instance Prelude.Hashable TerminateRequest
instance Prelude.NFData TerminateRequest
instance Core.ToJSON TerminateRequest where
toJSON :: TerminateRequest -> Value
toJSON TerminateRequest' {Text
workspaceId :: Text
$sel:workspaceId:TerminateRequest' :: TerminateRequest -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WorkspaceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workspaceId)]
)