{-# 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.Glue.UpdateWorkflow
-- 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)
--
-- Updates an existing workflow.
module Amazonka.Glue.UpdateWorkflow
  ( -- * Creating a Request
    UpdateWorkflow (..),
    newUpdateWorkflow,

    -- * Request Lenses
    updateWorkflow_maxConcurrentRuns,
    updateWorkflow_defaultRunProperties,
    updateWorkflow_description,
    updateWorkflow_name,

    -- * Destructuring the Response
    UpdateWorkflowResponse (..),
    newUpdateWorkflowResponse,

    -- * Response Lenses
    updateWorkflowResponse_name,
    updateWorkflowResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateWorkflow' smart constructor.
data UpdateWorkflow = UpdateWorkflow'
  { -- | You can use this parameter to prevent unwanted multiple updates to data,
    -- to control costs, or in some cases, to prevent exceeding the maximum
    -- number of concurrent runs of any of the component jobs. If you leave
    -- this parameter blank, there is no limit to the number of concurrent
    -- workflow runs.
    UpdateWorkflow -> Maybe Int
maxConcurrentRuns :: Prelude.Maybe Prelude.Int,
    -- | A collection of properties to be used as part of each execution of the
    -- workflow.
    UpdateWorkflow -> Maybe (HashMap Text Text)
defaultRunProperties :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The description of the workflow.
    UpdateWorkflow -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Name of the workflow to be updated.
    UpdateWorkflow -> Text
name :: Prelude.Text
  }
  deriving (UpdateWorkflow -> UpdateWorkflow -> Bool
(UpdateWorkflow -> UpdateWorkflow -> Bool)
-> (UpdateWorkflow -> UpdateWorkflow -> Bool) -> Eq UpdateWorkflow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWorkflow -> UpdateWorkflow -> Bool
$c/= :: UpdateWorkflow -> UpdateWorkflow -> Bool
== :: UpdateWorkflow -> UpdateWorkflow -> Bool
$c== :: UpdateWorkflow -> UpdateWorkflow -> Bool
Prelude.Eq, ReadPrec [UpdateWorkflow]
ReadPrec UpdateWorkflow
Int -> ReadS UpdateWorkflow
ReadS [UpdateWorkflow]
(Int -> ReadS UpdateWorkflow)
-> ReadS [UpdateWorkflow]
-> ReadPrec UpdateWorkflow
-> ReadPrec [UpdateWorkflow]
-> Read UpdateWorkflow
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateWorkflow]
$creadListPrec :: ReadPrec [UpdateWorkflow]
readPrec :: ReadPrec UpdateWorkflow
$creadPrec :: ReadPrec UpdateWorkflow
readList :: ReadS [UpdateWorkflow]
$creadList :: ReadS [UpdateWorkflow]
readsPrec :: Int -> ReadS UpdateWorkflow
$creadsPrec :: Int -> ReadS UpdateWorkflow
Prelude.Read, Int -> UpdateWorkflow -> ShowS
[UpdateWorkflow] -> ShowS
UpdateWorkflow -> String
(Int -> UpdateWorkflow -> ShowS)
-> (UpdateWorkflow -> String)
-> ([UpdateWorkflow] -> ShowS)
-> Show UpdateWorkflow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWorkflow] -> ShowS
$cshowList :: [UpdateWorkflow] -> ShowS
show :: UpdateWorkflow -> String
$cshow :: UpdateWorkflow -> String
showsPrec :: Int -> UpdateWorkflow -> ShowS
$cshowsPrec :: Int -> UpdateWorkflow -> ShowS
Prelude.Show, (forall x. UpdateWorkflow -> Rep UpdateWorkflow x)
-> (forall x. Rep UpdateWorkflow x -> UpdateWorkflow)
-> Generic UpdateWorkflow
forall x. Rep UpdateWorkflow x -> UpdateWorkflow
forall x. UpdateWorkflow -> Rep UpdateWorkflow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateWorkflow x -> UpdateWorkflow
$cfrom :: forall x. UpdateWorkflow -> Rep UpdateWorkflow x
Prelude.Generic)

-- |
-- Create a value of 'UpdateWorkflow' 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:
--
-- 'maxConcurrentRuns', 'updateWorkflow_maxConcurrentRuns' - You can use this parameter to prevent unwanted multiple updates to data,
-- to control costs, or in some cases, to prevent exceeding the maximum
-- number of concurrent runs of any of the component jobs. If you leave
-- this parameter blank, there is no limit to the number of concurrent
-- workflow runs.
--
-- 'defaultRunProperties', 'updateWorkflow_defaultRunProperties' - A collection of properties to be used as part of each execution of the
-- workflow.
--
-- 'description', 'updateWorkflow_description' - The description of the workflow.
--
-- 'name', 'updateWorkflow_name' - Name of the workflow to be updated.
newUpdateWorkflow ::
  -- | 'name'
  Prelude.Text ->
  UpdateWorkflow
newUpdateWorkflow :: Text -> UpdateWorkflow
newUpdateWorkflow Text
pName_ =
  UpdateWorkflow' :: Maybe Int
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Text
-> UpdateWorkflow
UpdateWorkflow'
    { $sel:maxConcurrentRuns:UpdateWorkflow' :: Maybe Int
maxConcurrentRuns =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRunProperties:UpdateWorkflow' :: Maybe (HashMap Text Text)
defaultRunProperties = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateWorkflow' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateWorkflow' :: Text
name = Text
pName_
    }

-- | You can use this parameter to prevent unwanted multiple updates to data,
-- to control costs, or in some cases, to prevent exceeding the maximum
-- number of concurrent runs of any of the component jobs. If you leave
-- this parameter blank, there is no limit to the number of concurrent
-- workflow runs.
updateWorkflow_maxConcurrentRuns :: Lens.Lens' UpdateWorkflow (Prelude.Maybe Prelude.Int)
updateWorkflow_maxConcurrentRuns :: (Maybe Int -> f (Maybe Int)) -> UpdateWorkflow -> f UpdateWorkflow
updateWorkflow_maxConcurrentRuns = (UpdateWorkflow -> Maybe Int)
-> (UpdateWorkflow -> Maybe Int -> UpdateWorkflow)
-> Lens UpdateWorkflow UpdateWorkflow (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkflow' {Maybe Int
maxConcurrentRuns :: Maybe Int
$sel:maxConcurrentRuns:UpdateWorkflow' :: UpdateWorkflow -> Maybe Int
maxConcurrentRuns} -> Maybe Int
maxConcurrentRuns) (\s :: UpdateWorkflow
s@UpdateWorkflow' {} Maybe Int
a -> UpdateWorkflow
s {$sel:maxConcurrentRuns:UpdateWorkflow' :: Maybe Int
maxConcurrentRuns = Maybe Int
a} :: UpdateWorkflow)

-- | A collection of properties to be used as part of each execution of the
-- workflow.
updateWorkflow_defaultRunProperties :: Lens.Lens' UpdateWorkflow (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateWorkflow_defaultRunProperties :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateWorkflow -> f UpdateWorkflow
updateWorkflow_defaultRunProperties = (UpdateWorkflow -> Maybe (HashMap Text Text))
-> (UpdateWorkflow -> Maybe (HashMap Text Text) -> UpdateWorkflow)
-> Lens
     UpdateWorkflow
     UpdateWorkflow
     (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 (\UpdateWorkflow' {Maybe (HashMap Text Text)
defaultRunProperties :: Maybe (HashMap Text Text)
$sel:defaultRunProperties:UpdateWorkflow' :: UpdateWorkflow -> Maybe (HashMap Text Text)
defaultRunProperties} -> Maybe (HashMap Text Text)
defaultRunProperties) (\s :: UpdateWorkflow
s@UpdateWorkflow' {} Maybe (HashMap Text Text)
a -> UpdateWorkflow
s {$sel:defaultRunProperties:UpdateWorkflow' :: Maybe (HashMap Text Text)
defaultRunProperties = Maybe (HashMap Text Text)
a} :: UpdateWorkflow) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateWorkflow -> f UpdateWorkflow)
-> ((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)))
-> UpdateWorkflow
-> f UpdateWorkflow
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

-- | The description of the workflow.
updateWorkflow_description :: Lens.Lens' UpdateWorkflow (Prelude.Maybe Prelude.Text)
updateWorkflow_description :: (Maybe Text -> f (Maybe Text))
-> UpdateWorkflow -> f UpdateWorkflow
updateWorkflow_description = (UpdateWorkflow -> Maybe Text)
-> (UpdateWorkflow -> Maybe Text -> UpdateWorkflow)
-> Lens UpdateWorkflow UpdateWorkflow (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkflow' {Maybe Text
description :: Maybe Text
$sel:description:UpdateWorkflow' :: UpdateWorkflow -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateWorkflow
s@UpdateWorkflow' {} Maybe Text
a -> UpdateWorkflow
s {$sel:description:UpdateWorkflow' :: Maybe Text
description = Maybe Text
a} :: UpdateWorkflow)

-- | Name of the workflow to be updated.
updateWorkflow_name :: Lens.Lens' UpdateWorkflow Prelude.Text
updateWorkflow_name :: (Text -> f Text) -> UpdateWorkflow -> f UpdateWorkflow
updateWorkflow_name = (UpdateWorkflow -> Text)
-> (UpdateWorkflow -> Text -> UpdateWorkflow)
-> Lens UpdateWorkflow UpdateWorkflow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkflow' {Text
name :: Text
$sel:name:UpdateWorkflow' :: UpdateWorkflow -> Text
name} -> Text
name) (\s :: UpdateWorkflow
s@UpdateWorkflow' {} Text
a -> UpdateWorkflow
s {$sel:name:UpdateWorkflow' :: Text
name = Text
a} :: UpdateWorkflow)

instance Core.AWSRequest UpdateWorkflow where
  type
    AWSResponse UpdateWorkflow =
      UpdateWorkflowResponse
  request :: UpdateWorkflow -> Request UpdateWorkflow
request = Service -> UpdateWorkflow -> Request UpdateWorkflow
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateWorkflow
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateWorkflow)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateWorkflow))
-> Logger
-> Service
-> Proxy UpdateWorkflow
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateWorkflow)))
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 -> Int -> UpdateWorkflowResponse
UpdateWorkflowResponse'
            (Maybe Text -> Int -> UpdateWorkflowResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateWorkflowResponse)
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
"Name")
            Either String (Int -> UpdateWorkflowResponse)
-> Either String Int -> Either String UpdateWorkflowResponse
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 UpdateWorkflow

instance Prelude.NFData UpdateWorkflow

instance Core.ToHeaders UpdateWorkflow where
  toHeaders :: UpdateWorkflow -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateWorkflow -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"AWSGlue.UpdateWorkflow" :: Prelude.ByteString),
            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 UpdateWorkflow where
  toJSON :: UpdateWorkflow -> Value
toJSON UpdateWorkflow' {Maybe Int
Maybe Text
Maybe (HashMap Text Text)
Text
name :: Text
description :: Maybe Text
defaultRunProperties :: Maybe (HashMap Text Text)
maxConcurrentRuns :: Maybe Int
$sel:name:UpdateWorkflow' :: UpdateWorkflow -> Text
$sel:description:UpdateWorkflow' :: UpdateWorkflow -> Maybe Text
$sel:defaultRunProperties:UpdateWorkflow' :: UpdateWorkflow -> Maybe (HashMap Text Text)
$sel:maxConcurrentRuns:UpdateWorkflow' :: UpdateWorkflow -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"MaxConcurrentRuns" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxConcurrentRuns,
            (Text
"DefaultRunProperties" 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)
defaultRunProperties,
            (Text
"Description" 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
description,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
          ]
      )

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

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

-- | /See:/ 'newUpdateWorkflowResponse' smart constructor.
data UpdateWorkflowResponse = UpdateWorkflowResponse'
  { -- | The name of the workflow which was specified in input.
    UpdateWorkflowResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateWorkflowResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateWorkflowResponse -> UpdateWorkflowResponse -> Bool
(UpdateWorkflowResponse -> UpdateWorkflowResponse -> Bool)
-> (UpdateWorkflowResponse -> UpdateWorkflowResponse -> Bool)
-> Eq UpdateWorkflowResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWorkflowResponse -> UpdateWorkflowResponse -> Bool
$c/= :: UpdateWorkflowResponse -> UpdateWorkflowResponse -> Bool
== :: UpdateWorkflowResponse -> UpdateWorkflowResponse -> Bool
$c== :: UpdateWorkflowResponse -> UpdateWorkflowResponse -> Bool
Prelude.Eq, ReadPrec [UpdateWorkflowResponse]
ReadPrec UpdateWorkflowResponse
Int -> ReadS UpdateWorkflowResponse
ReadS [UpdateWorkflowResponse]
(Int -> ReadS UpdateWorkflowResponse)
-> ReadS [UpdateWorkflowResponse]
-> ReadPrec UpdateWorkflowResponse
-> ReadPrec [UpdateWorkflowResponse]
-> Read UpdateWorkflowResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateWorkflowResponse]
$creadListPrec :: ReadPrec [UpdateWorkflowResponse]
readPrec :: ReadPrec UpdateWorkflowResponse
$creadPrec :: ReadPrec UpdateWorkflowResponse
readList :: ReadS [UpdateWorkflowResponse]
$creadList :: ReadS [UpdateWorkflowResponse]
readsPrec :: Int -> ReadS UpdateWorkflowResponse
$creadsPrec :: Int -> ReadS UpdateWorkflowResponse
Prelude.Read, Int -> UpdateWorkflowResponse -> ShowS
[UpdateWorkflowResponse] -> ShowS
UpdateWorkflowResponse -> String
(Int -> UpdateWorkflowResponse -> ShowS)
-> (UpdateWorkflowResponse -> String)
-> ([UpdateWorkflowResponse] -> ShowS)
-> Show UpdateWorkflowResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWorkflowResponse] -> ShowS
$cshowList :: [UpdateWorkflowResponse] -> ShowS
show :: UpdateWorkflowResponse -> String
$cshow :: UpdateWorkflowResponse -> String
showsPrec :: Int -> UpdateWorkflowResponse -> ShowS
$cshowsPrec :: Int -> UpdateWorkflowResponse -> ShowS
Prelude.Show, (forall x. UpdateWorkflowResponse -> Rep UpdateWorkflowResponse x)
-> (forall x.
    Rep UpdateWorkflowResponse x -> UpdateWorkflowResponse)
-> Generic UpdateWorkflowResponse
forall x. Rep UpdateWorkflowResponse x -> UpdateWorkflowResponse
forall x. UpdateWorkflowResponse -> Rep UpdateWorkflowResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateWorkflowResponse x -> UpdateWorkflowResponse
$cfrom :: forall x. UpdateWorkflowResponse -> Rep UpdateWorkflowResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateWorkflowResponse' 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:
--
-- 'name', 'updateWorkflowResponse_name' - The name of the workflow which was specified in input.
--
-- 'httpStatus', 'updateWorkflowResponse_httpStatus' - The response's http status code.
newUpdateWorkflowResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateWorkflowResponse
newUpdateWorkflowResponse :: Int -> UpdateWorkflowResponse
newUpdateWorkflowResponse Int
pHttpStatus_ =
  UpdateWorkflowResponse' :: Maybe Text -> Int -> UpdateWorkflowResponse
UpdateWorkflowResponse'
    { $sel:name:UpdateWorkflowResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateWorkflowResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the workflow which was specified in input.
updateWorkflowResponse_name :: Lens.Lens' UpdateWorkflowResponse (Prelude.Maybe Prelude.Text)
updateWorkflowResponse_name :: (Maybe Text -> f (Maybe Text))
-> UpdateWorkflowResponse -> f UpdateWorkflowResponse
updateWorkflowResponse_name = (UpdateWorkflowResponse -> Maybe Text)
-> (UpdateWorkflowResponse -> Maybe Text -> UpdateWorkflowResponse)
-> Lens
     UpdateWorkflowResponse
     UpdateWorkflowResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkflowResponse' {Maybe Text
name :: Maybe Text
$sel:name:UpdateWorkflowResponse' :: UpdateWorkflowResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateWorkflowResponse
s@UpdateWorkflowResponse' {} Maybe Text
a -> UpdateWorkflowResponse
s {$sel:name:UpdateWorkflowResponse' :: Maybe Text
name = Maybe Text
a} :: UpdateWorkflowResponse)

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

instance Prelude.NFData UpdateWorkflowResponse