{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AMP.CreateWorkspace
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new AMP workspace.
module Amazonka.AMP.CreateWorkspace
  ( -- * Creating a Request
    CreateWorkspace (..),
    newCreateWorkspace,

    -- * Request Lenses
    createWorkspace_alias,
    createWorkspace_clientToken,
    createWorkspace_tags,

    -- * Destructuring the Response
    CreateWorkspaceResponse (..),
    newCreateWorkspaceResponse,

    -- * Response Lenses
    createWorkspaceResponse_tags,
    createWorkspaceResponse_httpStatus,
    createWorkspaceResponse_arn,
    createWorkspaceResponse_status,
    createWorkspaceResponse_workspaceId,
  )
where

import Amazonka.AMP.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Represents the input of a CreateWorkspace operation.
--
-- /See:/ 'newCreateWorkspace' smart constructor.
data CreateWorkspace = CreateWorkspace'
  { -- | An optional user-assigned alias for this workspace. This alias is for
    -- user reference and does not need to be unique.
    CreateWorkspace -> Maybe Text
alias :: Prelude.Maybe Prelude.Text,
    -- | Optional, unique, case-sensitive, user-provided identifier to ensure the
    -- idempotency of the request.
    CreateWorkspace -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | Optional, user-provided tags for this workspace.
    CreateWorkspace -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (CreateWorkspace -> CreateWorkspace -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWorkspace -> CreateWorkspace -> Bool
$c/= :: CreateWorkspace -> CreateWorkspace -> Bool
== :: CreateWorkspace -> CreateWorkspace -> Bool
$c== :: CreateWorkspace -> CreateWorkspace -> Bool
Prelude.Eq, ReadPrec [CreateWorkspace]
ReadPrec CreateWorkspace
Int -> ReadS CreateWorkspace
ReadS [CreateWorkspace]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWorkspace]
$creadListPrec :: ReadPrec [CreateWorkspace]
readPrec :: ReadPrec CreateWorkspace
$creadPrec :: ReadPrec CreateWorkspace
readList :: ReadS [CreateWorkspace]
$creadList :: ReadS [CreateWorkspace]
readsPrec :: Int -> ReadS CreateWorkspace
$creadsPrec :: Int -> ReadS CreateWorkspace
Prelude.Read, Int -> CreateWorkspace -> ShowS
[CreateWorkspace] -> ShowS
CreateWorkspace -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWorkspace] -> ShowS
$cshowList :: [CreateWorkspace] -> ShowS
show :: CreateWorkspace -> String
$cshow :: CreateWorkspace -> String
showsPrec :: Int -> CreateWorkspace -> ShowS
$cshowsPrec :: Int -> CreateWorkspace -> ShowS
Prelude.Show, forall x. Rep CreateWorkspace x -> CreateWorkspace
forall x. CreateWorkspace -> Rep CreateWorkspace x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateWorkspace x -> CreateWorkspace
$cfrom :: forall x. CreateWorkspace -> Rep CreateWorkspace x
Prelude.Generic)

-- |
-- Create a value of 'CreateWorkspace' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'alias', 'createWorkspace_alias' - An optional user-assigned alias for this workspace. This alias is for
-- user reference and does not need to be unique.
--
-- 'clientToken', 'createWorkspace_clientToken' - Optional, unique, case-sensitive, user-provided identifier to ensure the
-- idempotency of the request.
--
-- 'tags', 'createWorkspace_tags' - Optional, user-provided tags for this workspace.
newCreateWorkspace ::
  CreateWorkspace
newCreateWorkspace :: CreateWorkspace
newCreateWorkspace =
  CreateWorkspace'
    { $sel:alias:CreateWorkspace' :: Maybe Text
alias = forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:CreateWorkspace' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateWorkspace' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
    }

-- | An optional user-assigned alias for this workspace. This alias is for
-- user reference and does not need to be unique.
createWorkspace_alias :: Lens.Lens' CreateWorkspace (Prelude.Maybe Prelude.Text)
createWorkspace_alias :: Lens' CreateWorkspace (Maybe Text)
createWorkspace_alias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe Text
alias :: Maybe Text
$sel:alias:CreateWorkspace' :: CreateWorkspace -> Maybe Text
alias} -> Maybe Text
alias) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe Text
a -> CreateWorkspace
s {$sel:alias:CreateWorkspace' :: Maybe Text
alias = Maybe Text
a} :: CreateWorkspace)

-- | Optional, unique, case-sensitive, user-provided identifier to ensure the
-- idempotency of the request.
createWorkspace_clientToken :: Lens.Lens' CreateWorkspace (Prelude.Maybe Prelude.Text)
createWorkspace_clientToken :: Lens' CreateWorkspace (Maybe Text)
createWorkspace_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateWorkspace' :: CreateWorkspace -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe Text
a -> CreateWorkspace
s {$sel:clientToken:CreateWorkspace' :: Maybe Text
clientToken = Maybe Text
a} :: CreateWorkspace)

-- | Optional, user-provided tags for this workspace.
createWorkspace_tags :: Lens.Lens' CreateWorkspace (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createWorkspace_tags :: Lens' CreateWorkspace (Maybe (HashMap Text Text))
createWorkspace_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateWorkspace' :: CreateWorkspace -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe (HashMap Text Text)
a -> CreateWorkspace
s {$sel:tags:CreateWorkspace' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateWorkspace) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest CreateWorkspace where
  type
    AWSResponse CreateWorkspace =
      CreateWorkspaceResponse
  request :: (Service -> Service) -> CreateWorkspace -> Request CreateWorkspace
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateWorkspace
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateWorkspace)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe (HashMap Text Text)
-> Int
-> Text
-> WorkspaceStatus
-> Text
-> CreateWorkspaceResponse
CreateWorkspaceResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"workspaceId")
      )

instance Prelude.Hashable CreateWorkspace where
  hashWithSalt :: Int -> CreateWorkspace -> Int
hashWithSalt Int
_salt CreateWorkspace' {Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
alias :: Maybe Text
$sel:tags:CreateWorkspace' :: CreateWorkspace -> Maybe (HashMap Text Text)
$sel:clientToken:CreateWorkspace' :: CreateWorkspace -> Maybe Text
$sel:alias:CreateWorkspace' :: CreateWorkspace -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
alias
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags

instance Prelude.NFData CreateWorkspace where
  rnf :: CreateWorkspace -> ()
rnf CreateWorkspace' {Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
alias :: Maybe Text
$sel:tags:CreateWorkspace' :: CreateWorkspace -> Maybe (HashMap Text Text)
$sel:clientToken:CreateWorkspace' :: CreateWorkspace -> Maybe Text
$sel:alias:CreateWorkspace' :: CreateWorkspace -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
alias
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags

instance Data.ToHeaders CreateWorkspace where
  toHeaders :: CreateWorkspace -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateWorkspace where
  toJSON :: CreateWorkspace -> Value
toJSON CreateWorkspace' {Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
alias :: Maybe Text
$sel:tags:CreateWorkspace' :: CreateWorkspace -> Maybe (HashMap Text Text)
$sel:clientToken:CreateWorkspace' :: CreateWorkspace -> Maybe Text
$sel:alias:CreateWorkspace' :: CreateWorkspace -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"alias" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
alias,
            (Key
"clientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
          ]
      )

instance Data.ToPath CreateWorkspace where
  toPath :: CreateWorkspace -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/workspaces"

instance Data.ToQuery CreateWorkspace where
  toQuery :: CreateWorkspace -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | Represents the output of a CreateWorkspace operation.
--
-- /See:/ 'newCreateWorkspaceResponse' smart constructor.
data CreateWorkspaceResponse = CreateWorkspaceResponse'
  { -- | The tags of this workspace.
    CreateWorkspaceResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateWorkspaceResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ARN of the workspace that was just created.
    CreateWorkspaceResponse -> Text
arn :: Prelude.Text,
    -- | The status of the workspace that was just created (usually CREATING).
    CreateWorkspaceResponse -> WorkspaceStatus
status :: WorkspaceStatus,
    -- | The generated ID of the workspace that was just created.
    CreateWorkspaceResponse -> Text
workspaceId :: Prelude.Text
  }
  deriving (CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
$c/= :: CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
== :: CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
$c== :: CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
Prelude.Eq, ReadPrec [CreateWorkspaceResponse]
ReadPrec CreateWorkspaceResponse
Int -> ReadS CreateWorkspaceResponse
ReadS [CreateWorkspaceResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWorkspaceResponse]
$creadListPrec :: ReadPrec [CreateWorkspaceResponse]
readPrec :: ReadPrec CreateWorkspaceResponse
$creadPrec :: ReadPrec CreateWorkspaceResponse
readList :: ReadS [CreateWorkspaceResponse]
$creadList :: ReadS [CreateWorkspaceResponse]
readsPrec :: Int -> ReadS CreateWorkspaceResponse
$creadsPrec :: Int -> ReadS CreateWorkspaceResponse
Prelude.Read, Int -> CreateWorkspaceResponse -> ShowS
[CreateWorkspaceResponse] -> ShowS
CreateWorkspaceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWorkspaceResponse] -> ShowS
$cshowList :: [CreateWorkspaceResponse] -> ShowS
show :: CreateWorkspaceResponse -> String
$cshow :: CreateWorkspaceResponse -> String
showsPrec :: Int -> CreateWorkspaceResponse -> ShowS
$cshowsPrec :: Int -> CreateWorkspaceResponse -> ShowS
Prelude.Show, forall x. Rep CreateWorkspaceResponse x -> CreateWorkspaceResponse
forall x. CreateWorkspaceResponse -> Rep CreateWorkspaceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateWorkspaceResponse x -> CreateWorkspaceResponse
$cfrom :: forall x. CreateWorkspaceResponse -> Rep CreateWorkspaceResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateWorkspaceResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'tags', 'createWorkspaceResponse_tags' - The tags of this workspace.
--
-- 'httpStatus', 'createWorkspaceResponse_httpStatus' - The response's http status code.
--
-- 'arn', 'createWorkspaceResponse_arn' - The ARN of the workspace that was just created.
--
-- 'status', 'createWorkspaceResponse_status' - The status of the workspace that was just created (usually CREATING).
--
-- 'workspaceId', 'createWorkspaceResponse_workspaceId' - The generated ID of the workspace that was just created.
newCreateWorkspaceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'arn'
  Prelude.Text ->
  -- | 'status'
  WorkspaceStatus ->
  -- | 'workspaceId'
  Prelude.Text ->
  CreateWorkspaceResponse
newCreateWorkspaceResponse :: Int -> Text -> WorkspaceStatus -> Text -> CreateWorkspaceResponse
newCreateWorkspaceResponse
  Int
pHttpStatus_
  Text
pArn_
  WorkspaceStatus
pStatus_
  Text
pWorkspaceId_ =
    CreateWorkspaceResponse'
      { $sel:tags:CreateWorkspaceResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:CreateWorkspaceResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:arn:CreateWorkspaceResponse' :: Text
arn = Text
pArn_,
        $sel:status:CreateWorkspaceResponse' :: WorkspaceStatus
status = WorkspaceStatus
pStatus_,
        $sel:workspaceId:CreateWorkspaceResponse' :: Text
workspaceId = Text
pWorkspaceId_
      }

-- | The tags of this workspace.
createWorkspaceResponse_tags :: Lens.Lens' CreateWorkspaceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createWorkspaceResponse_tags :: Lens' CreateWorkspaceResponse (Maybe (HashMap Text Text))
createWorkspaceResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspaceResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateWorkspaceResponse
s@CreateWorkspaceResponse' {} Maybe (HashMap Text Text)
a -> CreateWorkspaceResponse
s {$sel:tags:CreateWorkspaceResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateWorkspaceResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
createWorkspaceResponse_httpStatus :: Lens.Lens' CreateWorkspaceResponse Prelude.Int
createWorkspaceResponse_httpStatus :: Lens' CreateWorkspaceResponse Int
createWorkspaceResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspaceResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateWorkspaceResponse
s@CreateWorkspaceResponse' {} Int
a -> CreateWorkspaceResponse
s {$sel:httpStatus:CreateWorkspaceResponse' :: Int
httpStatus = Int
a} :: CreateWorkspaceResponse)

-- | The ARN of the workspace that was just created.
createWorkspaceResponse_arn :: Lens.Lens' CreateWorkspaceResponse Prelude.Text
createWorkspaceResponse_arn :: Lens' CreateWorkspaceResponse Text
createWorkspaceResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspaceResponse' {Text
arn :: Text
$sel:arn:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> Text
arn} -> Text
arn) (\s :: CreateWorkspaceResponse
s@CreateWorkspaceResponse' {} Text
a -> CreateWorkspaceResponse
s {$sel:arn:CreateWorkspaceResponse' :: Text
arn = Text
a} :: CreateWorkspaceResponse)

-- | The status of the workspace that was just created (usually CREATING).
createWorkspaceResponse_status :: Lens.Lens' CreateWorkspaceResponse WorkspaceStatus
createWorkspaceResponse_status :: Lens' CreateWorkspaceResponse WorkspaceStatus
createWorkspaceResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspaceResponse' {WorkspaceStatus
status :: WorkspaceStatus
$sel:status:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> WorkspaceStatus
status} -> WorkspaceStatus
status) (\s :: CreateWorkspaceResponse
s@CreateWorkspaceResponse' {} WorkspaceStatus
a -> CreateWorkspaceResponse
s {$sel:status:CreateWorkspaceResponse' :: WorkspaceStatus
status = WorkspaceStatus
a} :: CreateWorkspaceResponse)

-- | The generated ID of the workspace that was just created.
createWorkspaceResponse_workspaceId :: Lens.Lens' CreateWorkspaceResponse Prelude.Text
createWorkspaceResponse_workspaceId :: Lens' CreateWorkspaceResponse Text
createWorkspaceResponse_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspaceResponse' {Text
workspaceId :: Text
$sel:workspaceId:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> Text
workspaceId} -> Text
workspaceId) (\s :: CreateWorkspaceResponse
s@CreateWorkspaceResponse' {} Text
a -> CreateWorkspaceResponse
s {$sel:workspaceId:CreateWorkspaceResponse' :: Text
workspaceId = Text
a} :: CreateWorkspaceResponse)

instance Prelude.NFData CreateWorkspaceResponse where
  rnf :: CreateWorkspaceResponse -> ()
rnf CreateWorkspaceResponse' {Int
Maybe (HashMap Text Text)
Text
WorkspaceStatus
workspaceId :: Text
status :: WorkspaceStatus
arn :: Text
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
$sel:workspaceId:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> Text
$sel:status:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> WorkspaceStatus
$sel:arn:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> Text
$sel:httpStatus:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> Int
$sel:tags:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> Maybe (HashMap Text Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf WorkspaceStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
workspaceId