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