{-# 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.WellArchitected.CreateWorkload
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Create a new workload.
--
-- The owner of a workload can share the workload with other AWS accounts
-- and IAM users in the same AWS Region. Only the owner of a workload can
-- delete it.
--
-- For more information, see
-- <https://docs.aws.amazon.com/wellarchitected/latest/userguide/define-workload.html Defining a Workload>
-- in the /AWS Well-Architected Tool User Guide/.
module Amazonka.WellArchitected.CreateWorkload
  ( -- * Creating a Request
    CreateWorkload (..),
    newCreateWorkload,

    -- * Request Lenses
    createWorkload_architecturalDesign,
    createWorkload_accountIds,
    createWorkload_industry,
    createWorkload_awsRegions,
    createWorkload_industryType,
    createWorkload_notes,
    createWorkload_pillarPriorities,
    createWorkload_nonAwsRegions,
    createWorkload_tags,
    createWorkload_workloadName,
    createWorkload_description,
    createWorkload_environment,
    createWorkload_reviewOwner,
    createWorkload_lenses,
    createWorkload_clientRequestToken,

    -- * Destructuring the Response
    CreateWorkloadResponse (..),
    newCreateWorkloadResponse,

    -- * Response Lenses
    createWorkloadResponse_workloadArn,
    createWorkloadResponse_workloadId,
    createWorkloadResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WellArchitected.Types

-- | Input for workload creation.
--
-- /See:/ 'newCreateWorkload' smart constructor.
data CreateWorkload = CreateWorkload'
  { CreateWorkload -> Maybe Text
architecturalDesign :: Prelude.Maybe Prelude.Text,
    CreateWorkload -> Maybe [Text]
accountIds :: Prelude.Maybe [Prelude.Text],
    CreateWorkload -> Maybe Text
industry :: Prelude.Maybe Prelude.Text,
    CreateWorkload -> Maybe [Text]
awsRegions :: Prelude.Maybe [Prelude.Text],
    CreateWorkload -> Maybe Text
industryType :: Prelude.Maybe Prelude.Text,
    CreateWorkload -> Maybe Text
notes :: Prelude.Maybe Prelude.Text,
    CreateWorkload -> Maybe [Text]
pillarPriorities :: Prelude.Maybe [Prelude.Text],
    CreateWorkload -> Maybe [Text]
nonAwsRegions :: Prelude.Maybe [Prelude.Text],
    -- | The tags to be associated with the workload.
    CreateWorkload -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    CreateWorkload -> Text
workloadName :: Prelude.Text,
    CreateWorkload -> Text
description :: Prelude.Text,
    CreateWorkload -> WorkloadEnvironment
environment :: WorkloadEnvironment,
    CreateWorkload -> Text
reviewOwner :: Prelude.Text,
    CreateWorkload -> [Text]
lenses :: [Prelude.Text],
    CreateWorkload -> Text
clientRequestToken :: Prelude.Text
  }
  deriving (CreateWorkload -> CreateWorkload -> Bool
(CreateWorkload -> CreateWorkload -> Bool)
-> (CreateWorkload -> CreateWorkload -> Bool) -> Eq CreateWorkload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWorkload -> CreateWorkload -> Bool
$c/= :: CreateWorkload -> CreateWorkload -> Bool
== :: CreateWorkload -> CreateWorkload -> Bool
$c== :: CreateWorkload -> CreateWorkload -> Bool
Prelude.Eq, ReadPrec [CreateWorkload]
ReadPrec CreateWorkload
Int -> ReadS CreateWorkload
ReadS [CreateWorkload]
(Int -> ReadS CreateWorkload)
-> ReadS [CreateWorkload]
-> ReadPrec CreateWorkload
-> ReadPrec [CreateWorkload]
-> Read CreateWorkload
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWorkload]
$creadListPrec :: ReadPrec [CreateWorkload]
readPrec :: ReadPrec CreateWorkload
$creadPrec :: ReadPrec CreateWorkload
readList :: ReadS [CreateWorkload]
$creadList :: ReadS [CreateWorkload]
readsPrec :: Int -> ReadS CreateWorkload
$creadsPrec :: Int -> ReadS CreateWorkload
Prelude.Read, Int -> CreateWorkload -> ShowS
[CreateWorkload] -> ShowS
CreateWorkload -> String
(Int -> CreateWorkload -> ShowS)
-> (CreateWorkload -> String)
-> ([CreateWorkload] -> ShowS)
-> Show CreateWorkload
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWorkload] -> ShowS
$cshowList :: [CreateWorkload] -> ShowS
show :: CreateWorkload -> String
$cshow :: CreateWorkload -> String
showsPrec :: Int -> CreateWorkload -> ShowS
$cshowsPrec :: Int -> CreateWorkload -> ShowS
Prelude.Show, (forall x. CreateWorkload -> Rep CreateWorkload x)
-> (forall x. Rep CreateWorkload x -> CreateWorkload)
-> Generic CreateWorkload
forall x. Rep CreateWorkload x -> CreateWorkload
forall x. CreateWorkload -> Rep CreateWorkload x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateWorkload x -> CreateWorkload
$cfrom :: forall x. CreateWorkload -> Rep CreateWorkload x
Prelude.Generic)

-- |
-- Create a value of 'CreateWorkload' 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:
--
-- 'architecturalDesign', 'createWorkload_architecturalDesign' - Undocumented member.
--
-- 'accountIds', 'createWorkload_accountIds' - Undocumented member.
--
-- 'industry', 'createWorkload_industry' - Undocumented member.
--
-- 'awsRegions', 'createWorkload_awsRegions' - Undocumented member.
--
-- 'industryType', 'createWorkload_industryType' - Undocumented member.
--
-- 'notes', 'createWorkload_notes' - Undocumented member.
--
-- 'pillarPriorities', 'createWorkload_pillarPriorities' - Undocumented member.
--
-- 'nonAwsRegions', 'createWorkload_nonAwsRegions' - Undocumented member.
--
-- 'tags', 'createWorkload_tags' - The tags to be associated with the workload.
--
-- 'workloadName', 'createWorkload_workloadName' - Undocumented member.
--
-- 'description', 'createWorkload_description' - Undocumented member.
--
-- 'environment', 'createWorkload_environment' - Undocumented member.
--
-- 'reviewOwner', 'createWorkload_reviewOwner' - Undocumented member.
--
-- 'lenses', 'createWorkload_lenses' - Undocumented member.
--
-- 'clientRequestToken', 'createWorkload_clientRequestToken' - Undocumented member.
newCreateWorkload ::
  -- | 'workloadName'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  -- | 'environment'
  WorkloadEnvironment ->
  -- | 'reviewOwner'
  Prelude.Text ->
  -- | 'clientRequestToken'
  Prelude.Text ->
  CreateWorkload
newCreateWorkload :: Text
-> Text -> WorkloadEnvironment -> Text -> Text -> CreateWorkload
newCreateWorkload
  Text
pWorkloadName_
  Text
pDescription_
  WorkloadEnvironment
pEnvironment_
  Text
pReviewOwner_
  Text
pClientRequestToken_ =
    CreateWorkload' :: Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> WorkloadEnvironment
-> Text
-> [Text]
-> Text
-> CreateWorkload
CreateWorkload'
      { $sel:architecturalDesign:CreateWorkload' :: Maybe Text
architecturalDesign =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:accountIds:CreateWorkload' :: Maybe [Text]
accountIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:industry:CreateWorkload' :: Maybe Text
industry = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:awsRegions:CreateWorkload' :: Maybe [Text]
awsRegions = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:industryType:CreateWorkload' :: Maybe Text
industryType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:notes:CreateWorkload' :: Maybe Text
notes = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:pillarPriorities:CreateWorkload' :: Maybe [Text]
pillarPriorities = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:nonAwsRegions:CreateWorkload' :: Maybe [Text]
nonAwsRegions = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateWorkload' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:workloadName:CreateWorkload' :: Text
workloadName = Text
pWorkloadName_,
        $sel:description:CreateWorkload' :: Text
description = Text
pDescription_,
        $sel:environment:CreateWorkload' :: WorkloadEnvironment
environment = WorkloadEnvironment
pEnvironment_,
        $sel:reviewOwner:CreateWorkload' :: Text
reviewOwner = Text
pReviewOwner_,
        $sel:lenses:CreateWorkload' :: [Text]
lenses = [Text]
forall a. Monoid a => a
Prelude.mempty,
        $sel:clientRequestToken:CreateWorkload' :: Text
clientRequestToken = Text
pClientRequestToken_
      }

-- | Undocumented member.
createWorkload_architecturalDesign :: Lens.Lens' CreateWorkload (Prelude.Maybe Prelude.Text)
createWorkload_architecturalDesign :: (Maybe Text -> f (Maybe Text))
-> CreateWorkload -> f CreateWorkload
createWorkload_architecturalDesign = (CreateWorkload -> Maybe Text)
-> (CreateWorkload -> Maybe Text -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Maybe Text
architecturalDesign :: Maybe Text
$sel:architecturalDesign:CreateWorkload' :: CreateWorkload -> Maybe Text
architecturalDesign} -> Maybe Text
architecturalDesign) (\s :: CreateWorkload
s@CreateWorkload' {} Maybe Text
a -> CreateWorkload
s {$sel:architecturalDesign:CreateWorkload' :: Maybe Text
architecturalDesign = Maybe Text
a} :: CreateWorkload)

-- | Undocumented member.
createWorkload_accountIds :: Lens.Lens' CreateWorkload (Prelude.Maybe [Prelude.Text])
createWorkload_accountIds :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkload -> f CreateWorkload
createWorkload_accountIds = (CreateWorkload -> Maybe [Text])
-> (CreateWorkload -> Maybe [Text] -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:CreateWorkload' :: CreateWorkload -> Maybe [Text]
accountIds} -> Maybe [Text]
accountIds) (\s :: CreateWorkload
s@CreateWorkload' {} Maybe [Text]
a -> CreateWorkload
s {$sel:accountIds:CreateWorkload' :: Maybe [Text]
accountIds = Maybe [Text]
a} :: CreateWorkload) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateWorkload -> f CreateWorkload)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkload
-> f CreateWorkload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
createWorkload_industry :: Lens.Lens' CreateWorkload (Prelude.Maybe Prelude.Text)
createWorkload_industry :: (Maybe Text -> f (Maybe Text))
-> CreateWorkload -> f CreateWorkload
createWorkload_industry = (CreateWorkload -> Maybe Text)
-> (CreateWorkload -> Maybe Text -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Maybe Text
industry :: Maybe Text
$sel:industry:CreateWorkload' :: CreateWorkload -> Maybe Text
industry} -> Maybe Text
industry) (\s :: CreateWorkload
s@CreateWorkload' {} Maybe Text
a -> CreateWorkload
s {$sel:industry:CreateWorkload' :: Maybe Text
industry = Maybe Text
a} :: CreateWorkload)

-- | Undocumented member.
createWorkload_awsRegions :: Lens.Lens' CreateWorkload (Prelude.Maybe [Prelude.Text])
createWorkload_awsRegions :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkload -> f CreateWorkload
createWorkload_awsRegions = (CreateWorkload -> Maybe [Text])
-> (CreateWorkload -> Maybe [Text] -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Maybe [Text]
awsRegions :: Maybe [Text]
$sel:awsRegions:CreateWorkload' :: CreateWorkload -> Maybe [Text]
awsRegions} -> Maybe [Text]
awsRegions) (\s :: CreateWorkload
s@CreateWorkload' {} Maybe [Text]
a -> CreateWorkload
s {$sel:awsRegions:CreateWorkload' :: Maybe [Text]
awsRegions = Maybe [Text]
a} :: CreateWorkload) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateWorkload -> f CreateWorkload)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkload
-> f CreateWorkload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
createWorkload_industryType :: Lens.Lens' CreateWorkload (Prelude.Maybe Prelude.Text)
createWorkload_industryType :: (Maybe Text -> f (Maybe Text))
-> CreateWorkload -> f CreateWorkload
createWorkload_industryType = (CreateWorkload -> Maybe Text)
-> (CreateWorkload -> Maybe Text -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Maybe Text
industryType :: Maybe Text
$sel:industryType:CreateWorkload' :: CreateWorkload -> Maybe Text
industryType} -> Maybe Text
industryType) (\s :: CreateWorkload
s@CreateWorkload' {} Maybe Text
a -> CreateWorkload
s {$sel:industryType:CreateWorkload' :: Maybe Text
industryType = Maybe Text
a} :: CreateWorkload)

-- | Undocumented member.
createWorkload_notes :: Lens.Lens' CreateWorkload (Prelude.Maybe Prelude.Text)
createWorkload_notes :: (Maybe Text -> f (Maybe Text))
-> CreateWorkload -> f CreateWorkload
createWorkload_notes = (CreateWorkload -> Maybe Text)
-> (CreateWorkload -> Maybe Text -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Maybe Text
notes :: Maybe Text
$sel:notes:CreateWorkload' :: CreateWorkload -> Maybe Text
notes} -> Maybe Text
notes) (\s :: CreateWorkload
s@CreateWorkload' {} Maybe Text
a -> CreateWorkload
s {$sel:notes:CreateWorkload' :: Maybe Text
notes = Maybe Text
a} :: CreateWorkload)

-- | Undocumented member.
createWorkload_pillarPriorities :: Lens.Lens' CreateWorkload (Prelude.Maybe [Prelude.Text])
createWorkload_pillarPriorities :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkload -> f CreateWorkload
createWorkload_pillarPriorities = (CreateWorkload -> Maybe [Text])
-> (CreateWorkload -> Maybe [Text] -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Maybe [Text]
pillarPriorities :: Maybe [Text]
$sel:pillarPriorities:CreateWorkload' :: CreateWorkload -> Maybe [Text]
pillarPriorities} -> Maybe [Text]
pillarPriorities) (\s :: CreateWorkload
s@CreateWorkload' {} Maybe [Text]
a -> CreateWorkload
s {$sel:pillarPriorities:CreateWorkload' :: Maybe [Text]
pillarPriorities = Maybe [Text]
a} :: CreateWorkload) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateWorkload -> f CreateWorkload)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkload
-> f CreateWorkload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
createWorkload_nonAwsRegions :: Lens.Lens' CreateWorkload (Prelude.Maybe [Prelude.Text])
createWorkload_nonAwsRegions :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkload -> f CreateWorkload
createWorkload_nonAwsRegions = (CreateWorkload -> Maybe [Text])
-> (CreateWorkload -> Maybe [Text] -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Maybe [Text]
nonAwsRegions :: Maybe [Text]
$sel:nonAwsRegions:CreateWorkload' :: CreateWorkload -> Maybe [Text]
nonAwsRegions} -> Maybe [Text]
nonAwsRegions) (\s :: CreateWorkload
s@CreateWorkload' {} Maybe [Text]
a -> CreateWorkload
s {$sel:nonAwsRegions:CreateWorkload' :: Maybe [Text]
nonAwsRegions = Maybe [Text]
a} :: CreateWorkload) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateWorkload -> f CreateWorkload)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkload
-> f CreateWorkload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The tags to be associated with the workload.
createWorkload_tags :: Lens.Lens' CreateWorkload (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createWorkload_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateWorkload -> f CreateWorkload
createWorkload_tags = (CreateWorkload -> Maybe (HashMap Text Text))
-> (CreateWorkload -> Maybe (HashMap Text Text) -> CreateWorkload)
-> Lens
     CreateWorkload
     CreateWorkload
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateWorkload' :: CreateWorkload -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateWorkload
s@CreateWorkload' {} Maybe (HashMap Text Text)
a -> CreateWorkload
s {$sel:tags:CreateWorkload' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateWorkload) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateWorkload -> f CreateWorkload)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateWorkload
-> f CreateWorkload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
createWorkload_workloadName :: Lens.Lens' CreateWorkload Prelude.Text
createWorkload_workloadName :: (Text -> f Text) -> CreateWorkload -> f CreateWorkload
createWorkload_workloadName = (CreateWorkload -> Text)
-> (CreateWorkload -> Text -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Text
workloadName :: Text
$sel:workloadName:CreateWorkload' :: CreateWorkload -> Text
workloadName} -> Text
workloadName) (\s :: CreateWorkload
s@CreateWorkload' {} Text
a -> CreateWorkload
s {$sel:workloadName:CreateWorkload' :: Text
workloadName = Text
a} :: CreateWorkload)

-- | Undocumented member.
createWorkload_description :: Lens.Lens' CreateWorkload Prelude.Text
createWorkload_description :: (Text -> f Text) -> CreateWorkload -> f CreateWorkload
createWorkload_description = (CreateWorkload -> Text)
-> (CreateWorkload -> Text -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Text
description :: Text
$sel:description:CreateWorkload' :: CreateWorkload -> Text
description} -> Text
description) (\s :: CreateWorkload
s@CreateWorkload' {} Text
a -> CreateWorkload
s {$sel:description:CreateWorkload' :: Text
description = Text
a} :: CreateWorkload)

-- | Undocumented member.
createWorkload_environment :: Lens.Lens' CreateWorkload WorkloadEnvironment
createWorkload_environment :: (WorkloadEnvironment -> f WorkloadEnvironment)
-> CreateWorkload -> f CreateWorkload
createWorkload_environment = (CreateWorkload -> WorkloadEnvironment)
-> (CreateWorkload -> WorkloadEnvironment -> CreateWorkload)
-> Lens
     CreateWorkload
     CreateWorkload
     WorkloadEnvironment
     WorkloadEnvironment
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {WorkloadEnvironment
environment :: WorkloadEnvironment
$sel:environment:CreateWorkload' :: CreateWorkload -> WorkloadEnvironment
environment} -> WorkloadEnvironment
environment) (\s :: CreateWorkload
s@CreateWorkload' {} WorkloadEnvironment
a -> CreateWorkload
s {$sel:environment:CreateWorkload' :: WorkloadEnvironment
environment = WorkloadEnvironment
a} :: CreateWorkload)

-- | Undocumented member.
createWorkload_reviewOwner :: Lens.Lens' CreateWorkload Prelude.Text
createWorkload_reviewOwner :: (Text -> f Text) -> CreateWorkload -> f CreateWorkload
createWorkload_reviewOwner = (CreateWorkload -> Text)
-> (CreateWorkload -> Text -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Text
reviewOwner :: Text
$sel:reviewOwner:CreateWorkload' :: CreateWorkload -> Text
reviewOwner} -> Text
reviewOwner) (\s :: CreateWorkload
s@CreateWorkload' {} Text
a -> CreateWorkload
s {$sel:reviewOwner:CreateWorkload' :: Text
reviewOwner = Text
a} :: CreateWorkload)

-- | Undocumented member.
createWorkload_lenses :: Lens.Lens' CreateWorkload [Prelude.Text]
createWorkload_lenses :: ([Text] -> f [Text]) -> CreateWorkload -> f CreateWorkload
createWorkload_lenses = (CreateWorkload -> [Text])
-> (CreateWorkload -> [Text] -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {[Text]
lenses :: [Text]
$sel:lenses:CreateWorkload' :: CreateWorkload -> [Text]
lenses} -> [Text]
lenses) (\s :: CreateWorkload
s@CreateWorkload' {} [Text]
a -> CreateWorkload
s {$sel:lenses:CreateWorkload' :: [Text]
lenses = [Text]
a} :: CreateWorkload) (([Text] -> f [Text]) -> CreateWorkload -> f CreateWorkload)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateWorkload
-> f CreateWorkload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
createWorkload_clientRequestToken :: Lens.Lens' CreateWorkload Prelude.Text
createWorkload_clientRequestToken :: (Text -> f Text) -> CreateWorkload -> f CreateWorkload
createWorkload_clientRequestToken = (CreateWorkload -> Text)
-> (CreateWorkload -> Text -> CreateWorkload)
-> Lens CreateWorkload CreateWorkload Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkload' {Text
clientRequestToken :: Text
$sel:clientRequestToken:CreateWorkload' :: CreateWorkload -> Text
clientRequestToken} -> Text
clientRequestToken) (\s :: CreateWorkload
s@CreateWorkload' {} Text
a -> CreateWorkload
s {$sel:clientRequestToken:CreateWorkload' :: Text
clientRequestToken = Text
a} :: CreateWorkload)

instance Core.AWSRequest CreateWorkload where
  type
    AWSResponse CreateWorkload =
      CreateWorkloadResponse
  request :: CreateWorkload -> Request CreateWorkload
request = Service -> CreateWorkload -> Request CreateWorkload
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateWorkload
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateWorkload)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateWorkload))
-> Logger
-> Service
-> Proxy CreateWorkload
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateWorkload)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe Text -> Int -> CreateWorkloadResponse
CreateWorkloadResponse'
            (Maybe Text -> Maybe Text -> Int -> CreateWorkloadResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateWorkloadResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"WorkloadArn")
            Either String (Maybe Text -> Int -> CreateWorkloadResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateWorkloadResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"WorkloadId")
            Either String (Int -> CreateWorkloadResponse)
-> Either String Int -> Either String CreateWorkloadResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateWorkload

instance Prelude.NFData CreateWorkload

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

instance Core.ToJSON CreateWorkload where
  toJSON :: CreateWorkload -> Value
toJSON CreateWorkload' {[Text]
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Text
WorkloadEnvironment
clientRequestToken :: Text
lenses :: [Text]
reviewOwner :: Text
environment :: WorkloadEnvironment
description :: Text
workloadName :: Text
tags :: Maybe (HashMap Text Text)
nonAwsRegions :: Maybe [Text]
pillarPriorities :: Maybe [Text]
notes :: Maybe Text
industryType :: Maybe Text
awsRegions :: Maybe [Text]
industry :: Maybe Text
accountIds :: Maybe [Text]
architecturalDesign :: Maybe Text
$sel:clientRequestToken:CreateWorkload' :: CreateWorkload -> Text
$sel:lenses:CreateWorkload' :: CreateWorkload -> [Text]
$sel:reviewOwner:CreateWorkload' :: CreateWorkload -> Text
$sel:environment:CreateWorkload' :: CreateWorkload -> WorkloadEnvironment
$sel:description:CreateWorkload' :: CreateWorkload -> Text
$sel:workloadName:CreateWorkload' :: CreateWorkload -> Text
$sel:tags:CreateWorkload' :: CreateWorkload -> Maybe (HashMap Text Text)
$sel:nonAwsRegions:CreateWorkload' :: CreateWorkload -> Maybe [Text]
$sel:pillarPriorities:CreateWorkload' :: CreateWorkload -> Maybe [Text]
$sel:notes:CreateWorkload' :: CreateWorkload -> Maybe Text
$sel:industryType:CreateWorkload' :: CreateWorkload -> Maybe Text
$sel:awsRegions:CreateWorkload' :: CreateWorkload -> Maybe [Text]
$sel:industry:CreateWorkload' :: CreateWorkload -> Maybe Text
$sel:accountIds:CreateWorkload' :: CreateWorkload -> Maybe [Text]
$sel:architecturalDesign:CreateWorkload' :: CreateWorkload -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ArchitecturalDesign" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
architecturalDesign,
            (Text
"AccountIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
accountIds,
            (Text
"Industry" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
industry,
            (Text
"AwsRegions" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
awsRegions,
            (Text
"IndustryType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
industryType,
            (Text
"Notes" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
notes,
            (Text
"PillarPriorities" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
pillarPriorities,
            (Text
"NonAwsRegions" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
nonAwsRegions,
            (Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WorkloadName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workloadName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
description),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Environment" Text -> WorkloadEnvironment -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= WorkloadEnvironment
environment),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ReviewOwner" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
reviewOwner),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Lenses" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
lenses),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ClientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientRequestToken)
          ]
      )

instance Core.ToPath CreateWorkload where
  toPath :: CreateWorkload -> ByteString
toPath = ByteString -> CreateWorkload -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/workloads"

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

-- | Output of a create workload call.
--
-- /See:/ 'newCreateWorkloadResponse' smart constructor.
data CreateWorkloadResponse = CreateWorkloadResponse'
  { CreateWorkloadResponse -> Maybe Text
workloadArn :: Prelude.Maybe Prelude.Text,
    CreateWorkloadResponse -> Maybe Text
workloadId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateWorkloadResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateWorkloadResponse -> CreateWorkloadResponse -> Bool
(CreateWorkloadResponse -> CreateWorkloadResponse -> Bool)
-> (CreateWorkloadResponse -> CreateWorkloadResponse -> Bool)
-> Eq CreateWorkloadResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWorkloadResponse -> CreateWorkloadResponse -> Bool
$c/= :: CreateWorkloadResponse -> CreateWorkloadResponse -> Bool
== :: CreateWorkloadResponse -> CreateWorkloadResponse -> Bool
$c== :: CreateWorkloadResponse -> CreateWorkloadResponse -> Bool
Prelude.Eq, ReadPrec [CreateWorkloadResponse]
ReadPrec CreateWorkloadResponse
Int -> ReadS CreateWorkloadResponse
ReadS [CreateWorkloadResponse]
(Int -> ReadS CreateWorkloadResponse)
-> ReadS [CreateWorkloadResponse]
-> ReadPrec CreateWorkloadResponse
-> ReadPrec [CreateWorkloadResponse]
-> Read CreateWorkloadResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWorkloadResponse]
$creadListPrec :: ReadPrec [CreateWorkloadResponse]
readPrec :: ReadPrec CreateWorkloadResponse
$creadPrec :: ReadPrec CreateWorkloadResponse
readList :: ReadS [CreateWorkloadResponse]
$creadList :: ReadS [CreateWorkloadResponse]
readsPrec :: Int -> ReadS CreateWorkloadResponse
$creadsPrec :: Int -> ReadS CreateWorkloadResponse
Prelude.Read, Int -> CreateWorkloadResponse -> ShowS
[CreateWorkloadResponse] -> ShowS
CreateWorkloadResponse -> String
(Int -> CreateWorkloadResponse -> ShowS)
-> (CreateWorkloadResponse -> String)
-> ([CreateWorkloadResponse] -> ShowS)
-> Show CreateWorkloadResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWorkloadResponse] -> ShowS
$cshowList :: [CreateWorkloadResponse] -> ShowS
show :: CreateWorkloadResponse -> String
$cshow :: CreateWorkloadResponse -> String
showsPrec :: Int -> CreateWorkloadResponse -> ShowS
$cshowsPrec :: Int -> CreateWorkloadResponse -> ShowS
Prelude.Show, (forall x. CreateWorkloadResponse -> Rep CreateWorkloadResponse x)
-> (forall x.
    Rep CreateWorkloadResponse x -> CreateWorkloadResponse)
-> Generic CreateWorkloadResponse
forall x. Rep CreateWorkloadResponse x -> CreateWorkloadResponse
forall x. CreateWorkloadResponse -> Rep CreateWorkloadResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateWorkloadResponse x -> CreateWorkloadResponse
$cfrom :: forall x. CreateWorkloadResponse -> Rep CreateWorkloadResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateWorkloadResponse' 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:
--
-- 'workloadArn', 'createWorkloadResponse_workloadArn' - Undocumented member.
--
-- 'workloadId', 'createWorkloadResponse_workloadId' - Undocumented member.
--
-- 'httpStatus', 'createWorkloadResponse_httpStatus' - The response's http status code.
newCreateWorkloadResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateWorkloadResponse
newCreateWorkloadResponse :: Int -> CreateWorkloadResponse
newCreateWorkloadResponse Int
pHttpStatus_ =
  CreateWorkloadResponse' :: Maybe Text -> Maybe Text -> Int -> CreateWorkloadResponse
CreateWorkloadResponse'
    { $sel:workloadArn:CreateWorkloadResponse' :: Maybe Text
workloadArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:CreateWorkloadResponse' :: Maybe Text
workloadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateWorkloadResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createWorkloadResponse_workloadArn :: Lens.Lens' CreateWorkloadResponse (Prelude.Maybe Prelude.Text)
createWorkloadResponse_workloadArn :: (Maybe Text -> f (Maybe Text))
-> CreateWorkloadResponse -> f CreateWorkloadResponse
createWorkloadResponse_workloadArn = (CreateWorkloadResponse -> Maybe Text)
-> (CreateWorkloadResponse -> Maybe Text -> CreateWorkloadResponse)
-> Lens
     CreateWorkloadResponse
     CreateWorkloadResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkloadResponse' {Maybe Text
workloadArn :: Maybe Text
$sel:workloadArn:CreateWorkloadResponse' :: CreateWorkloadResponse -> Maybe Text
workloadArn} -> Maybe Text
workloadArn) (\s :: CreateWorkloadResponse
s@CreateWorkloadResponse' {} Maybe Text
a -> CreateWorkloadResponse
s {$sel:workloadArn:CreateWorkloadResponse' :: Maybe Text
workloadArn = Maybe Text
a} :: CreateWorkloadResponse)

-- | Undocumented member.
createWorkloadResponse_workloadId :: Lens.Lens' CreateWorkloadResponse (Prelude.Maybe Prelude.Text)
createWorkloadResponse_workloadId :: (Maybe Text -> f (Maybe Text))
-> CreateWorkloadResponse -> f CreateWorkloadResponse
createWorkloadResponse_workloadId = (CreateWorkloadResponse -> Maybe Text)
-> (CreateWorkloadResponse -> Maybe Text -> CreateWorkloadResponse)
-> Lens
     CreateWorkloadResponse
     CreateWorkloadResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkloadResponse' {Maybe Text
workloadId :: Maybe Text
$sel:workloadId:CreateWorkloadResponse' :: CreateWorkloadResponse -> Maybe Text
workloadId} -> Maybe Text
workloadId) (\s :: CreateWorkloadResponse
s@CreateWorkloadResponse' {} Maybe Text
a -> CreateWorkloadResponse
s {$sel:workloadId:CreateWorkloadResponse' :: Maybe Text
workloadId = Maybe Text
a} :: CreateWorkloadResponse)

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

instance Prelude.NFData CreateWorkloadResponse