{-# 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.ResumeWorkflowRun
-- 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)
--
-- Restarts selected nodes of a previous partially completed workflow run
-- and resumes the workflow run. The selected nodes and all nodes that are
-- downstream from the selected nodes are run.
module Amazonka.Glue.ResumeWorkflowRun
  ( -- * Creating a Request
    ResumeWorkflowRun (..),
    newResumeWorkflowRun,

    -- * Request Lenses
    resumeWorkflowRun_name,
    resumeWorkflowRun_runId,
    resumeWorkflowRun_nodeIds,

    -- * Destructuring the Response
    ResumeWorkflowRunResponse (..),
    newResumeWorkflowRunResponse,

    -- * Response Lenses
    resumeWorkflowRunResponse_nodeIds,
    resumeWorkflowRunResponse_runId,
    resumeWorkflowRunResponse_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:/ 'newResumeWorkflowRun' smart constructor.
data ResumeWorkflowRun = ResumeWorkflowRun'
  { -- | The name of the workflow to resume.
    ResumeWorkflowRun -> Text
name :: Prelude.Text,
    -- | The ID of the workflow run to resume.
    ResumeWorkflowRun -> Text
runId :: Prelude.Text,
    -- | A list of the node IDs for the nodes you want to restart. The nodes that
    -- are to be restarted must have a run attempt in the original run.
    ResumeWorkflowRun -> [Text]
nodeIds :: [Prelude.Text]
  }
  deriving (ResumeWorkflowRun -> ResumeWorkflowRun -> Bool
(ResumeWorkflowRun -> ResumeWorkflowRun -> Bool)
-> (ResumeWorkflowRun -> ResumeWorkflowRun -> Bool)
-> Eq ResumeWorkflowRun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResumeWorkflowRun -> ResumeWorkflowRun -> Bool
$c/= :: ResumeWorkflowRun -> ResumeWorkflowRun -> Bool
== :: ResumeWorkflowRun -> ResumeWorkflowRun -> Bool
$c== :: ResumeWorkflowRun -> ResumeWorkflowRun -> Bool
Prelude.Eq, ReadPrec [ResumeWorkflowRun]
ReadPrec ResumeWorkflowRun
Int -> ReadS ResumeWorkflowRun
ReadS [ResumeWorkflowRun]
(Int -> ReadS ResumeWorkflowRun)
-> ReadS [ResumeWorkflowRun]
-> ReadPrec ResumeWorkflowRun
-> ReadPrec [ResumeWorkflowRun]
-> Read ResumeWorkflowRun
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResumeWorkflowRun]
$creadListPrec :: ReadPrec [ResumeWorkflowRun]
readPrec :: ReadPrec ResumeWorkflowRun
$creadPrec :: ReadPrec ResumeWorkflowRun
readList :: ReadS [ResumeWorkflowRun]
$creadList :: ReadS [ResumeWorkflowRun]
readsPrec :: Int -> ReadS ResumeWorkflowRun
$creadsPrec :: Int -> ReadS ResumeWorkflowRun
Prelude.Read, Int -> ResumeWorkflowRun -> ShowS
[ResumeWorkflowRun] -> ShowS
ResumeWorkflowRun -> String
(Int -> ResumeWorkflowRun -> ShowS)
-> (ResumeWorkflowRun -> String)
-> ([ResumeWorkflowRun] -> ShowS)
-> Show ResumeWorkflowRun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResumeWorkflowRun] -> ShowS
$cshowList :: [ResumeWorkflowRun] -> ShowS
show :: ResumeWorkflowRun -> String
$cshow :: ResumeWorkflowRun -> String
showsPrec :: Int -> ResumeWorkflowRun -> ShowS
$cshowsPrec :: Int -> ResumeWorkflowRun -> ShowS
Prelude.Show, (forall x. ResumeWorkflowRun -> Rep ResumeWorkflowRun x)
-> (forall x. Rep ResumeWorkflowRun x -> ResumeWorkflowRun)
-> Generic ResumeWorkflowRun
forall x. Rep ResumeWorkflowRun x -> ResumeWorkflowRun
forall x. ResumeWorkflowRun -> Rep ResumeWorkflowRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResumeWorkflowRun x -> ResumeWorkflowRun
$cfrom :: forall x. ResumeWorkflowRun -> Rep ResumeWorkflowRun x
Prelude.Generic)

-- |
-- Create a value of 'ResumeWorkflowRun' 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', 'resumeWorkflowRun_name' - The name of the workflow to resume.
--
-- 'runId', 'resumeWorkflowRun_runId' - The ID of the workflow run to resume.
--
-- 'nodeIds', 'resumeWorkflowRun_nodeIds' - A list of the node IDs for the nodes you want to restart. The nodes that
-- are to be restarted must have a run attempt in the original run.
newResumeWorkflowRun ::
  -- | 'name'
  Prelude.Text ->
  -- | 'runId'
  Prelude.Text ->
  ResumeWorkflowRun
newResumeWorkflowRun :: Text -> Text -> ResumeWorkflowRun
newResumeWorkflowRun Text
pName_ Text
pRunId_ =
  ResumeWorkflowRun' :: Text -> Text -> [Text] -> ResumeWorkflowRun
ResumeWorkflowRun'
    { $sel:name:ResumeWorkflowRun' :: Text
name = Text
pName_,
      $sel:runId:ResumeWorkflowRun' :: Text
runId = Text
pRunId_,
      $sel:nodeIds:ResumeWorkflowRun' :: [Text]
nodeIds = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The name of the workflow to resume.
resumeWorkflowRun_name :: Lens.Lens' ResumeWorkflowRun Prelude.Text
resumeWorkflowRun_name :: (Text -> f Text) -> ResumeWorkflowRun -> f ResumeWorkflowRun
resumeWorkflowRun_name = (ResumeWorkflowRun -> Text)
-> (ResumeWorkflowRun -> Text -> ResumeWorkflowRun)
-> Lens ResumeWorkflowRun ResumeWorkflowRun Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResumeWorkflowRun' {Text
name :: Text
$sel:name:ResumeWorkflowRun' :: ResumeWorkflowRun -> Text
name} -> Text
name) (\s :: ResumeWorkflowRun
s@ResumeWorkflowRun' {} Text
a -> ResumeWorkflowRun
s {$sel:name:ResumeWorkflowRun' :: Text
name = Text
a} :: ResumeWorkflowRun)

-- | The ID of the workflow run to resume.
resumeWorkflowRun_runId :: Lens.Lens' ResumeWorkflowRun Prelude.Text
resumeWorkflowRun_runId :: (Text -> f Text) -> ResumeWorkflowRun -> f ResumeWorkflowRun
resumeWorkflowRun_runId = (ResumeWorkflowRun -> Text)
-> (ResumeWorkflowRun -> Text -> ResumeWorkflowRun)
-> Lens ResumeWorkflowRun ResumeWorkflowRun Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResumeWorkflowRun' {Text
runId :: Text
$sel:runId:ResumeWorkflowRun' :: ResumeWorkflowRun -> Text
runId} -> Text
runId) (\s :: ResumeWorkflowRun
s@ResumeWorkflowRun' {} Text
a -> ResumeWorkflowRun
s {$sel:runId:ResumeWorkflowRun' :: Text
runId = Text
a} :: ResumeWorkflowRun)

-- | A list of the node IDs for the nodes you want to restart. The nodes that
-- are to be restarted must have a run attempt in the original run.
resumeWorkflowRun_nodeIds :: Lens.Lens' ResumeWorkflowRun [Prelude.Text]
resumeWorkflowRun_nodeIds :: ([Text] -> f [Text]) -> ResumeWorkflowRun -> f ResumeWorkflowRun
resumeWorkflowRun_nodeIds = (ResumeWorkflowRun -> [Text])
-> (ResumeWorkflowRun -> [Text] -> ResumeWorkflowRun)
-> Lens ResumeWorkflowRun ResumeWorkflowRun [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResumeWorkflowRun' {[Text]
nodeIds :: [Text]
$sel:nodeIds:ResumeWorkflowRun' :: ResumeWorkflowRun -> [Text]
nodeIds} -> [Text]
nodeIds) (\s :: ResumeWorkflowRun
s@ResumeWorkflowRun' {} [Text]
a -> ResumeWorkflowRun
s {$sel:nodeIds:ResumeWorkflowRun' :: [Text]
nodeIds = [Text]
a} :: ResumeWorkflowRun) (([Text] -> f [Text]) -> ResumeWorkflowRun -> f ResumeWorkflowRun)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ResumeWorkflowRun
-> f ResumeWorkflowRun
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

instance Core.AWSRequest ResumeWorkflowRun where
  type
    AWSResponse ResumeWorkflowRun =
      ResumeWorkflowRunResponse
  request :: ResumeWorkflowRun -> Request ResumeWorkflowRun
request = Service -> ResumeWorkflowRun -> Request ResumeWorkflowRun
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ResumeWorkflowRun
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ResumeWorkflowRun)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ResumeWorkflowRun))
-> Logger
-> Service
-> Proxy ResumeWorkflowRun
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ResumeWorkflowRun)))
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 -> ResumeWorkflowRunResponse
ResumeWorkflowRunResponse'
            (Maybe [Text] -> Maybe Text -> Int -> ResumeWorkflowRunResponse)
-> Either String (Maybe [Text])
-> Either String (Maybe Text -> Int -> ResumeWorkflowRunResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NodeIds" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ResumeWorkflowRunResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ResumeWorkflowRunResponse)
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
"RunId")
            Either String (Int -> ResumeWorkflowRunResponse)
-> Either String Int -> Either String ResumeWorkflowRunResponse
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 ResumeWorkflowRun

instance Prelude.NFData ResumeWorkflowRun

instance Core.ToHeaders ResumeWorkflowRun where
  toHeaders :: ResumeWorkflowRun -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ResumeWorkflowRun -> 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.ResumeWorkflowRun" :: 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 ResumeWorkflowRun where
  toJSON :: ResumeWorkflowRun -> Value
toJSON ResumeWorkflowRun' {[Text]
Text
nodeIds :: [Text]
runId :: Text
name :: Text
$sel:nodeIds:ResumeWorkflowRun' :: ResumeWorkflowRun -> [Text]
$sel:runId:ResumeWorkflowRun' :: ResumeWorkflowRun -> Text
$sel:name:ResumeWorkflowRun' :: ResumeWorkflowRun -> 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
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RunId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
runId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"NodeIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
nodeIds)
          ]
      )

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

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

-- | /See:/ 'newResumeWorkflowRunResponse' smart constructor.
data ResumeWorkflowRunResponse = ResumeWorkflowRunResponse'
  { -- | A list of the node IDs for the nodes that were actually restarted.
    ResumeWorkflowRunResponse -> Maybe [Text]
nodeIds :: Prelude.Maybe [Prelude.Text],
    -- | The new ID assigned to the resumed workflow run. Each resume of a
    -- workflow run will have a new run ID.
    ResumeWorkflowRunResponse -> Maybe Text
runId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ResumeWorkflowRunResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ResumeWorkflowRunResponse -> ResumeWorkflowRunResponse -> Bool
(ResumeWorkflowRunResponse -> ResumeWorkflowRunResponse -> Bool)
-> (ResumeWorkflowRunResponse -> ResumeWorkflowRunResponse -> Bool)
-> Eq ResumeWorkflowRunResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResumeWorkflowRunResponse -> ResumeWorkflowRunResponse -> Bool
$c/= :: ResumeWorkflowRunResponse -> ResumeWorkflowRunResponse -> Bool
== :: ResumeWorkflowRunResponse -> ResumeWorkflowRunResponse -> Bool
$c== :: ResumeWorkflowRunResponse -> ResumeWorkflowRunResponse -> Bool
Prelude.Eq, ReadPrec [ResumeWorkflowRunResponse]
ReadPrec ResumeWorkflowRunResponse
Int -> ReadS ResumeWorkflowRunResponse
ReadS [ResumeWorkflowRunResponse]
(Int -> ReadS ResumeWorkflowRunResponse)
-> ReadS [ResumeWorkflowRunResponse]
-> ReadPrec ResumeWorkflowRunResponse
-> ReadPrec [ResumeWorkflowRunResponse]
-> Read ResumeWorkflowRunResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResumeWorkflowRunResponse]
$creadListPrec :: ReadPrec [ResumeWorkflowRunResponse]
readPrec :: ReadPrec ResumeWorkflowRunResponse
$creadPrec :: ReadPrec ResumeWorkflowRunResponse
readList :: ReadS [ResumeWorkflowRunResponse]
$creadList :: ReadS [ResumeWorkflowRunResponse]
readsPrec :: Int -> ReadS ResumeWorkflowRunResponse
$creadsPrec :: Int -> ReadS ResumeWorkflowRunResponse
Prelude.Read, Int -> ResumeWorkflowRunResponse -> ShowS
[ResumeWorkflowRunResponse] -> ShowS
ResumeWorkflowRunResponse -> String
(Int -> ResumeWorkflowRunResponse -> ShowS)
-> (ResumeWorkflowRunResponse -> String)
-> ([ResumeWorkflowRunResponse] -> ShowS)
-> Show ResumeWorkflowRunResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResumeWorkflowRunResponse] -> ShowS
$cshowList :: [ResumeWorkflowRunResponse] -> ShowS
show :: ResumeWorkflowRunResponse -> String
$cshow :: ResumeWorkflowRunResponse -> String
showsPrec :: Int -> ResumeWorkflowRunResponse -> ShowS
$cshowsPrec :: Int -> ResumeWorkflowRunResponse -> ShowS
Prelude.Show, (forall x.
 ResumeWorkflowRunResponse -> Rep ResumeWorkflowRunResponse x)
-> (forall x.
    Rep ResumeWorkflowRunResponse x -> ResumeWorkflowRunResponse)
-> Generic ResumeWorkflowRunResponse
forall x.
Rep ResumeWorkflowRunResponse x -> ResumeWorkflowRunResponse
forall x.
ResumeWorkflowRunResponse -> Rep ResumeWorkflowRunResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResumeWorkflowRunResponse x -> ResumeWorkflowRunResponse
$cfrom :: forall x.
ResumeWorkflowRunResponse -> Rep ResumeWorkflowRunResponse x
Prelude.Generic)

-- |
-- Create a value of 'ResumeWorkflowRunResponse' 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:
--
-- 'nodeIds', 'resumeWorkflowRunResponse_nodeIds' - A list of the node IDs for the nodes that were actually restarted.
--
-- 'runId', 'resumeWorkflowRunResponse_runId' - The new ID assigned to the resumed workflow run. Each resume of a
-- workflow run will have a new run ID.
--
-- 'httpStatus', 'resumeWorkflowRunResponse_httpStatus' - The response's http status code.
newResumeWorkflowRunResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ResumeWorkflowRunResponse
newResumeWorkflowRunResponse :: Int -> ResumeWorkflowRunResponse
newResumeWorkflowRunResponse Int
pHttpStatus_ =
  ResumeWorkflowRunResponse' :: Maybe [Text] -> Maybe Text -> Int -> ResumeWorkflowRunResponse
ResumeWorkflowRunResponse'
    { $sel:nodeIds:ResumeWorkflowRunResponse' :: Maybe [Text]
nodeIds =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:runId:ResumeWorkflowRunResponse' :: Maybe Text
runId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ResumeWorkflowRunResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of the node IDs for the nodes that were actually restarted.
resumeWorkflowRunResponse_nodeIds :: Lens.Lens' ResumeWorkflowRunResponse (Prelude.Maybe [Prelude.Text])
resumeWorkflowRunResponse_nodeIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ResumeWorkflowRunResponse -> f ResumeWorkflowRunResponse
resumeWorkflowRunResponse_nodeIds = (ResumeWorkflowRunResponse -> Maybe [Text])
-> (ResumeWorkflowRunResponse
    -> Maybe [Text] -> ResumeWorkflowRunResponse)
-> Lens
     ResumeWorkflowRunResponse
     ResumeWorkflowRunResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResumeWorkflowRunResponse' {Maybe [Text]
nodeIds :: Maybe [Text]
$sel:nodeIds:ResumeWorkflowRunResponse' :: ResumeWorkflowRunResponse -> Maybe [Text]
nodeIds} -> Maybe [Text]
nodeIds) (\s :: ResumeWorkflowRunResponse
s@ResumeWorkflowRunResponse' {} Maybe [Text]
a -> ResumeWorkflowRunResponse
s {$sel:nodeIds:ResumeWorkflowRunResponse' :: Maybe [Text]
nodeIds = Maybe [Text]
a} :: ResumeWorkflowRunResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ResumeWorkflowRunResponse -> f ResumeWorkflowRunResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ResumeWorkflowRunResponse
-> f ResumeWorkflowRunResponse
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 new ID assigned to the resumed workflow run. Each resume of a
-- workflow run will have a new run ID.
resumeWorkflowRunResponse_runId :: Lens.Lens' ResumeWorkflowRunResponse (Prelude.Maybe Prelude.Text)
resumeWorkflowRunResponse_runId :: (Maybe Text -> f (Maybe Text))
-> ResumeWorkflowRunResponse -> f ResumeWorkflowRunResponse
resumeWorkflowRunResponse_runId = (ResumeWorkflowRunResponse -> Maybe Text)
-> (ResumeWorkflowRunResponse
    -> Maybe Text -> ResumeWorkflowRunResponse)
-> Lens
     ResumeWorkflowRunResponse
     ResumeWorkflowRunResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResumeWorkflowRunResponse' {Maybe Text
runId :: Maybe Text
$sel:runId:ResumeWorkflowRunResponse' :: ResumeWorkflowRunResponse -> Maybe Text
runId} -> Maybe Text
runId) (\s :: ResumeWorkflowRunResponse
s@ResumeWorkflowRunResponse' {} Maybe Text
a -> ResumeWorkflowRunResponse
s {$sel:runId:ResumeWorkflowRunResponse' :: Maybe Text
runId = Maybe Text
a} :: ResumeWorkflowRunResponse)

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

instance Prelude.NFData ResumeWorkflowRunResponse