{-# 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.RobOMaker.StartSimulationJobBatch
-- 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)
--
-- Starts a new simulation job batch. The batch is defined using one or
-- more @SimulationJobRequest@ objects.
module Amazonka.RobOMaker.StartSimulationJobBatch
  ( -- * Creating a Request
    StartSimulationJobBatch (..),
    newStartSimulationJobBatch,

    -- * Request Lenses
    startSimulationJobBatch_batchPolicy,
    startSimulationJobBatch_clientRequestToken,
    startSimulationJobBatch_tags,
    startSimulationJobBatch_createSimulationJobRequests,

    -- * Destructuring the Response
    StartSimulationJobBatchResponse (..),
    newStartSimulationJobBatchResponse,

    -- * Response Lenses
    startSimulationJobBatchResponse_failureReason,
    startSimulationJobBatchResponse_status,
    startSimulationJobBatchResponse_arn,
    startSimulationJobBatchResponse_createdAt,
    startSimulationJobBatchResponse_failureCode,
    startSimulationJobBatchResponse_failedRequests,
    startSimulationJobBatchResponse_batchPolicy,
    startSimulationJobBatchResponse_createdRequests,
    startSimulationJobBatchResponse_pendingRequests,
    startSimulationJobBatchResponse_clientRequestToken,
    startSimulationJobBatchResponse_tags,
    startSimulationJobBatchResponse_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.RobOMaker.Types

-- | /See:/ 'newStartSimulationJobBatch' smart constructor.
data StartSimulationJobBatch = StartSimulationJobBatch'
  { -- | The batch policy.
    StartSimulationJobBatch -> Maybe BatchPolicy
batchPolicy :: Prelude.Maybe BatchPolicy,
    -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    StartSimulationJobBatch -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | A map that contains tag keys and tag values that are attached to the
    -- deployment job batch.
    StartSimulationJobBatch -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A list of simulation job requests to create in the batch.
    StartSimulationJobBatch -> NonEmpty SimulationJobRequest
createSimulationJobRequests :: Prelude.NonEmpty SimulationJobRequest
  }
  deriving (StartSimulationJobBatch -> StartSimulationJobBatch -> Bool
(StartSimulationJobBatch -> StartSimulationJobBatch -> Bool)
-> (StartSimulationJobBatch -> StartSimulationJobBatch -> Bool)
-> Eq StartSimulationJobBatch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSimulationJobBatch -> StartSimulationJobBatch -> Bool
$c/= :: StartSimulationJobBatch -> StartSimulationJobBatch -> Bool
== :: StartSimulationJobBatch -> StartSimulationJobBatch -> Bool
$c== :: StartSimulationJobBatch -> StartSimulationJobBatch -> Bool
Prelude.Eq, ReadPrec [StartSimulationJobBatch]
ReadPrec StartSimulationJobBatch
Int -> ReadS StartSimulationJobBatch
ReadS [StartSimulationJobBatch]
(Int -> ReadS StartSimulationJobBatch)
-> ReadS [StartSimulationJobBatch]
-> ReadPrec StartSimulationJobBatch
-> ReadPrec [StartSimulationJobBatch]
-> Read StartSimulationJobBatch
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartSimulationJobBatch]
$creadListPrec :: ReadPrec [StartSimulationJobBatch]
readPrec :: ReadPrec StartSimulationJobBatch
$creadPrec :: ReadPrec StartSimulationJobBatch
readList :: ReadS [StartSimulationJobBatch]
$creadList :: ReadS [StartSimulationJobBatch]
readsPrec :: Int -> ReadS StartSimulationJobBatch
$creadsPrec :: Int -> ReadS StartSimulationJobBatch
Prelude.Read, Int -> StartSimulationJobBatch -> ShowS
[StartSimulationJobBatch] -> ShowS
StartSimulationJobBatch -> String
(Int -> StartSimulationJobBatch -> ShowS)
-> (StartSimulationJobBatch -> String)
-> ([StartSimulationJobBatch] -> ShowS)
-> Show StartSimulationJobBatch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSimulationJobBatch] -> ShowS
$cshowList :: [StartSimulationJobBatch] -> ShowS
show :: StartSimulationJobBatch -> String
$cshow :: StartSimulationJobBatch -> String
showsPrec :: Int -> StartSimulationJobBatch -> ShowS
$cshowsPrec :: Int -> StartSimulationJobBatch -> ShowS
Prelude.Show, (forall x.
 StartSimulationJobBatch -> Rep StartSimulationJobBatch x)
-> (forall x.
    Rep StartSimulationJobBatch x -> StartSimulationJobBatch)
-> Generic StartSimulationJobBatch
forall x. Rep StartSimulationJobBatch x -> StartSimulationJobBatch
forall x. StartSimulationJobBatch -> Rep StartSimulationJobBatch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartSimulationJobBatch x -> StartSimulationJobBatch
$cfrom :: forall x. StartSimulationJobBatch -> Rep StartSimulationJobBatch x
Prelude.Generic)

-- |
-- Create a value of 'StartSimulationJobBatch' 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:
--
-- 'batchPolicy', 'startSimulationJobBatch_batchPolicy' - The batch policy.
--
-- 'clientRequestToken', 'startSimulationJobBatch_clientRequestToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'tags', 'startSimulationJobBatch_tags' - A map that contains tag keys and tag values that are attached to the
-- deployment job batch.
--
-- 'createSimulationJobRequests', 'startSimulationJobBatch_createSimulationJobRequests' - A list of simulation job requests to create in the batch.
newStartSimulationJobBatch ::
  -- | 'createSimulationJobRequests'
  Prelude.NonEmpty SimulationJobRequest ->
  StartSimulationJobBatch
newStartSimulationJobBatch :: NonEmpty SimulationJobRequest -> StartSimulationJobBatch
newStartSimulationJobBatch
  NonEmpty SimulationJobRequest
pCreateSimulationJobRequests_ =
    StartSimulationJobBatch' :: Maybe BatchPolicy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> NonEmpty SimulationJobRequest
-> StartSimulationJobBatch
StartSimulationJobBatch'
      { $sel:batchPolicy:StartSimulationJobBatch' :: Maybe BatchPolicy
batchPolicy =
          Maybe BatchPolicy
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:StartSimulationJobBatch' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartSimulationJobBatch' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:createSimulationJobRequests:StartSimulationJobBatch' :: NonEmpty SimulationJobRequest
createSimulationJobRequests =
          Tagged
  (NonEmpty SimulationJobRequest)
  (Identity (NonEmpty SimulationJobRequest))
-> Tagged
     (NonEmpty SimulationJobRequest)
     (Identity (NonEmpty SimulationJobRequest))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
            (Tagged
   (NonEmpty SimulationJobRequest)
   (Identity (NonEmpty SimulationJobRequest))
 -> Tagged
      (NonEmpty SimulationJobRequest)
      (Identity (NonEmpty SimulationJobRequest)))
-> NonEmpty SimulationJobRequest -> NonEmpty SimulationJobRequest
forall t b. AReview t b -> b -> t
Lens.# NonEmpty SimulationJobRequest
pCreateSimulationJobRequests_
      }

-- | The batch policy.
startSimulationJobBatch_batchPolicy :: Lens.Lens' StartSimulationJobBatch (Prelude.Maybe BatchPolicy)
startSimulationJobBatch_batchPolicy :: (Maybe BatchPolicy -> f (Maybe BatchPolicy))
-> StartSimulationJobBatch -> f StartSimulationJobBatch
startSimulationJobBatch_batchPolicy = (StartSimulationJobBatch -> Maybe BatchPolicy)
-> (StartSimulationJobBatch
    -> Maybe BatchPolicy -> StartSimulationJobBatch)
-> Lens
     StartSimulationJobBatch
     StartSimulationJobBatch
     (Maybe BatchPolicy)
     (Maybe BatchPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatch' {Maybe BatchPolicy
batchPolicy :: Maybe BatchPolicy
$sel:batchPolicy:StartSimulationJobBatch' :: StartSimulationJobBatch -> Maybe BatchPolicy
batchPolicy} -> Maybe BatchPolicy
batchPolicy) (\s :: StartSimulationJobBatch
s@StartSimulationJobBatch' {} Maybe BatchPolicy
a -> StartSimulationJobBatch
s {$sel:batchPolicy:StartSimulationJobBatch' :: Maybe BatchPolicy
batchPolicy = Maybe BatchPolicy
a} :: StartSimulationJobBatch)

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
startSimulationJobBatch_clientRequestToken :: Lens.Lens' StartSimulationJobBatch (Prelude.Maybe Prelude.Text)
startSimulationJobBatch_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartSimulationJobBatch -> f StartSimulationJobBatch
startSimulationJobBatch_clientRequestToken = (StartSimulationJobBatch -> Maybe Text)
-> (StartSimulationJobBatch
    -> Maybe Text -> StartSimulationJobBatch)
-> Lens
     StartSimulationJobBatch
     StartSimulationJobBatch
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatch' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartSimulationJobBatch' :: StartSimulationJobBatch -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartSimulationJobBatch
s@StartSimulationJobBatch' {} Maybe Text
a -> StartSimulationJobBatch
s {$sel:clientRequestToken:StartSimulationJobBatch' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartSimulationJobBatch)

-- | A map that contains tag keys and tag values that are attached to the
-- deployment job batch.
startSimulationJobBatch_tags :: Lens.Lens' StartSimulationJobBatch (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startSimulationJobBatch_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartSimulationJobBatch -> f StartSimulationJobBatch
startSimulationJobBatch_tags = (StartSimulationJobBatch -> Maybe (HashMap Text Text))
-> (StartSimulationJobBatch
    -> Maybe (HashMap Text Text) -> StartSimulationJobBatch)
-> Lens
     StartSimulationJobBatch
     StartSimulationJobBatch
     (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 (\StartSimulationJobBatch' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StartSimulationJobBatch' :: StartSimulationJobBatch -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StartSimulationJobBatch
s@StartSimulationJobBatch' {} Maybe (HashMap Text Text)
a -> StartSimulationJobBatch
s {$sel:tags:StartSimulationJobBatch' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StartSimulationJobBatch) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> StartSimulationJobBatch -> f StartSimulationJobBatch)
-> ((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)))
-> StartSimulationJobBatch
-> f StartSimulationJobBatch
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

-- | A list of simulation job requests to create in the batch.
startSimulationJobBatch_createSimulationJobRequests :: Lens.Lens' StartSimulationJobBatch (Prelude.NonEmpty SimulationJobRequest)
startSimulationJobBatch_createSimulationJobRequests :: (NonEmpty SimulationJobRequest
 -> f (NonEmpty SimulationJobRequest))
-> StartSimulationJobBatch -> f StartSimulationJobBatch
startSimulationJobBatch_createSimulationJobRequests = (StartSimulationJobBatch -> NonEmpty SimulationJobRequest)
-> (StartSimulationJobBatch
    -> NonEmpty SimulationJobRequest -> StartSimulationJobBatch)
-> Lens
     StartSimulationJobBatch
     StartSimulationJobBatch
     (NonEmpty SimulationJobRequest)
     (NonEmpty SimulationJobRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatch' {NonEmpty SimulationJobRequest
createSimulationJobRequests :: NonEmpty SimulationJobRequest
$sel:createSimulationJobRequests:StartSimulationJobBatch' :: StartSimulationJobBatch -> NonEmpty SimulationJobRequest
createSimulationJobRequests} -> NonEmpty SimulationJobRequest
createSimulationJobRequests) (\s :: StartSimulationJobBatch
s@StartSimulationJobBatch' {} NonEmpty SimulationJobRequest
a -> StartSimulationJobBatch
s {$sel:createSimulationJobRequests:StartSimulationJobBatch' :: NonEmpty SimulationJobRequest
createSimulationJobRequests = NonEmpty SimulationJobRequest
a} :: StartSimulationJobBatch) ((NonEmpty SimulationJobRequest
  -> f (NonEmpty SimulationJobRequest))
 -> StartSimulationJobBatch -> f StartSimulationJobBatch)
-> ((NonEmpty SimulationJobRequest
     -> f (NonEmpty SimulationJobRequest))
    -> NonEmpty SimulationJobRequest
    -> f (NonEmpty SimulationJobRequest))
-> (NonEmpty SimulationJobRequest
    -> f (NonEmpty SimulationJobRequest))
-> StartSimulationJobBatch
-> f StartSimulationJobBatch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty SimulationJobRequest
 -> f (NonEmpty SimulationJobRequest))
-> NonEmpty SimulationJobRequest
-> f (NonEmpty SimulationJobRequest)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest StartSimulationJobBatch where
  type
    AWSResponse StartSimulationJobBatch =
      StartSimulationJobBatchResponse
  request :: StartSimulationJobBatch -> Request StartSimulationJobBatch
request = Service
-> StartSimulationJobBatch -> Request StartSimulationJobBatch
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartSimulationJobBatch
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartSimulationJobBatch)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartSimulationJobBatch))
-> Logger
-> Service
-> Proxy StartSimulationJobBatch
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartSimulationJobBatch)))
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 SimulationJobBatchStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe SimulationJobBatchErrorCode
-> Maybe [FailedCreateSimulationJobRequest]
-> Maybe BatchPolicy
-> Maybe [SimulationJobSummary]
-> Maybe (NonEmpty SimulationJobRequest)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> StartSimulationJobBatchResponse
StartSimulationJobBatchResponse'
            (Maybe Text
 -> Maybe SimulationJobBatchStatus
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe SimulationJobBatchErrorCode
 -> Maybe [FailedCreateSimulationJobRequest]
 -> Maybe BatchPolicy
 -> Maybe [SimulationJobSummary]
 -> Maybe (NonEmpty SimulationJobRequest)
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> StartSimulationJobBatchResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe SimulationJobBatchStatus
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe SimulationJobBatchErrorCode
      -> Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> StartSimulationJobBatchResponse)
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
"failureReason")
            Either
  String
  (Maybe SimulationJobBatchStatus
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe SimulationJobBatchErrorCode
   -> Maybe [FailedCreateSimulationJobRequest]
   -> Maybe BatchPolicy
   -> Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> StartSimulationJobBatchResponse)
-> Either String (Maybe SimulationJobBatchStatus)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe SimulationJobBatchErrorCode
      -> Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> StartSimulationJobBatchResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe SimulationJobBatchStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"status")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe SimulationJobBatchErrorCode
   -> Maybe [FailedCreateSimulationJobRequest]
   -> Maybe BatchPolicy
   -> Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> StartSimulationJobBatchResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe SimulationJobBatchErrorCode
      -> Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> StartSimulationJobBatchResponse)
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
"arn")
            Either
  String
  (Maybe POSIX
   -> Maybe SimulationJobBatchErrorCode
   -> Maybe [FailedCreateSimulationJobRequest]
   -> Maybe BatchPolicy
   -> Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> StartSimulationJobBatchResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe SimulationJobBatchErrorCode
      -> Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> StartSimulationJobBatchResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdAt")
            Either
  String
  (Maybe SimulationJobBatchErrorCode
   -> Maybe [FailedCreateSimulationJobRequest]
   -> Maybe BatchPolicy
   -> Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> StartSimulationJobBatchResponse)
-> Either String (Maybe SimulationJobBatchErrorCode)
-> Either
     String
     (Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> StartSimulationJobBatchResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe SimulationJobBatchErrorCode)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"failureCode")
            Either
  String
  (Maybe [FailedCreateSimulationJobRequest]
   -> Maybe BatchPolicy
   -> Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> StartSimulationJobBatchResponse)
-> Either String (Maybe [FailedCreateSimulationJobRequest])
-> Either
     String
     (Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> StartSimulationJobBatchResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [FailedCreateSimulationJobRequest]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"failedRequests" Either String (Maybe (Maybe [FailedCreateSimulationJobRequest]))
-> Maybe [FailedCreateSimulationJobRequest]
-> Either String (Maybe [FailedCreateSimulationJobRequest])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [FailedCreateSimulationJobRequest]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe BatchPolicy
   -> Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> StartSimulationJobBatchResponse)
-> Either String (Maybe BatchPolicy)
-> Either
     String
     (Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> StartSimulationJobBatchResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe BatchPolicy)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"batchPolicy")
            Either
  String
  (Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> StartSimulationJobBatchResponse)
-> Either String (Maybe [SimulationJobSummary])
-> Either
     String
     (Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> StartSimulationJobBatchResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [SimulationJobSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdRequests"
                            Either String (Maybe (Maybe [SimulationJobSummary]))
-> Maybe [SimulationJobSummary]
-> Either String (Maybe [SimulationJobSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SimulationJobSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> StartSimulationJobBatchResponse)
-> Either String (Maybe (NonEmpty SimulationJobRequest))
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> StartSimulationJobBatchResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (NonEmpty SimulationJobRequest))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"pendingRequests")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> StartSimulationJobBatchResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> StartSimulationJobBatchResponse)
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
"clientRequestToken")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Int -> StartSimulationJobBatchResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> StartSimulationJobBatchResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> StartSimulationJobBatchResponse)
-> Either String Int
-> Either String StartSimulationJobBatchResponse
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 StartSimulationJobBatch

instance Prelude.NFData StartSimulationJobBatch

instance Core.ToHeaders StartSimulationJobBatch where
  toHeaders :: StartSimulationJobBatch -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartSimulationJobBatch -> 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 StartSimulationJobBatch where
  toJSON :: StartSimulationJobBatch -> Value
toJSON StartSimulationJobBatch' {Maybe Text
Maybe (HashMap Text Text)
Maybe BatchPolicy
NonEmpty SimulationJobRequest
createSimulationJobRequests :: NonEmpty SimulationJobRequest
tags :: Maybe (HashMap Text Text)
clientRequestToken :: Maybe Text
batchPolicy :: Maybe BatchPolicy
$sel:createSimulationJobRequests:StartSimulationJobBatch' :: StartSimulationJobBatch -> NonEmpty SimulationJobRequest
$sel:tags:StartSimulationJobBatch' :: StartSimulationJobBatch -> Maybe (HashMap Text Text)
$sel:clientRequestToken:StartSimulationJobBatch' :: StartSimulationJobBatch -> Maybe Text
$sel:batchPolicy:StartSimulationJobBatch' :: StartSimulationJobBatch -> Maybe BatchPolicy
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"batchPolicy" Text -> BatchPolicy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BatchPolicy -> Pair) -> Maybe BatchPolicy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchPolicy
batchPolicy,
            (Text
"clientRequestToken" 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
clientRequestToken,
            (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
"createSimulationJobRequests"
                  Text -> NonEmpty SimulationJobRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty SimulationJobRequest
createSimulationJobRequests
              )
          ]
      )

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

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

-- | /See:/ 'newStartSimulationJobBatchResponse' smart constructor.
data StartSimulationJobBatchResponse = StartSimulationJobBatchResponse'
  { -- | The reason the simulation job batch failed.
    StartSimulationJobBatchResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The status of the simulation job batch.
    --
    -- [Pending]
    --     The simulation job batch request is pending.
    --
    -- [InProgress]
    --     The simulation job batch is in progress.
    --
    -- [Failed]
    --     The simulation job batch failed. One or more simulation job requests
    --     could not be completed due to an internal failure (like
    --     @InternalServiceError@). See @failureCode@ and @failureReason@ for
    --     more information.
    --
    -- [Completed]
    --     The simulation batch job completed. A batch is complete when (1)
    --     there are no pending simulation job requests in the batch and none
    --     of the failed simulation job requests are due to
    --     @InternalServiceError@ and (2) when all created simulation jobs have
    --     reached a terminal state (for example, @Completed@ or @Failed@).
    --
    -- [Canceled]
    --     The simulation batch job was cancelled.
    --
    -- [Canceling]
    --     The simulation batch job is being cancelled.
    --
    -- [Completing]
    --     The simulation batch job is completing.
    --
    -- [TimingOut]
    --     The simulation job batch is timing out.
    --
    --     If a batch timing out, and there are pending requests that were
    --     failing due to an internal failure (like @InternalServiceError@),
    --     the batch status will be @Failed@. If there are no such failing
    --     request, the batch status will be @TimedOut@.
    --
    -- [TimedOut]
    --     The simulation batch job timed out.
    StartSimulationJobBatchResponse -> Maybe SimulationJobBatchStatus
status :: Prelude.Maybe SimulationJobBatchStatus,
    -- | The Amazon Resource Name (arn) of the batch.
    StartSimulationJobBatchResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the simulation job batch
    -- was created.
    StartSimulationJobBatchResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The failure code if the simulation job batch failed.
    StartSimulationJobBatchResponse
-> Maybe SimulationJobBatchErrorCode
failureCode :: Prelude.Maybe SimulationJobBatchErrorCode,
    -- | A list of failed simulation job requests. The request failed to be
    -- created into a simulation job. Failed requests do not have a simulation
    -- job ID.
    StartSimulationJobBatchResponse
-> Maybe [FailedCreateSimulationJobRequest]
failedRequests :: Prelude.Maybe [FailedCreateSimulationJobRequest],
    -- | The batch policy.
    StartSimulationJobBatchResponse -> Maybe BatchPolicy
batchPolicy :: Prelude.Maybe BatchPolicy,
    -- | A list of created simulation job request summaries.
    StartSimulationJobBatchResponse -> Maybe [SimulationJobSummary]
createdRequests :: Prelude.Maybe [SimulationJobSummary],
    -- | A list of pending simulation job requests. These requests have not yet
    -- been created into simulation jobs.
    StartSimulationJobBatchResponse
-> Maybe (NonEmpty SimulationJobRequest)
pendingRequests :: Prelude.Maybe (Prelude.NonEmpty SimulationJobRequest),
    -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    StartSimulationJobBatchResponse -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | A map that contains tag keys and tag values that are attached to the
    -- deployment job batch.
    StartSimulationJobBatchResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    StartSimulationJobBatchResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartSimulationJobBatchResponse
-> StartSimulationJobBatchResponse -> Bool
(StartSimulationJobBatchResponse
 -> StartSimulationJobBatchResponse -> Bool)
-> (StartSimulationJobBatchResponse
    -> StartSimulationJobBatchResponse -> Bool)
-> Eq StartSimulationJobBatchResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSimulationJobBatchResponse
-> StartSimulationJobBatchResponse -> Bool
$c/= :: StartSimulationJobBatchResponse
-> StartSimulationJobBatchResponse -> Bool
== :: StartSimulationJobBatchResponse
-> StartSimulationJobBatchResponse -> Bool
$c== :: StartSimulationJobBatchResponse
-> StartSimulationJobBatchResponse -> Bool
Prelude.Eq, ReadPrec [StartSimulationJobBatchResponse]
ReadPrec StartSimulationJobBatchResponse
Int -> ReadS StartSimulationJobBatchResponse
ReadS [StartSimulationJobBatchResponse]
(Int -> ReadS StartSimulationJobBatchResponse)
-> ReadS [StartSimulationJobBatchResponse]
-> ReadPrec StartSimulationJobBatchResponse
-> ReadPrec [StartSimulationJobBatchResponse]
-> Read StartSimulationJobBatchResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartSimulationJobBatchResponse]
$creadListPrec :: ReadPrec [StartSimulationJobBatchResponse]
readPrec :: ReadPrec StartSimulationJobBatchResponse
$creadPrec :: ReadPrec StartSimulationJobBatchResponse
readList :: ReadS [StartSimulationJobBatchResponse]
$creadList :: ReadS [StartSimulationJobBatchResponse]
readsPrec :: Int -> ReadS StartSimulationJobBatchResponse
$creadsPrec :: Int -> ReadS StartSimulationJobBatchResponse
Prelude.Read, Int -> StartSimulationJobBatchResponse -> ShowS
[StartSimulationJobBatchResponse] -> ShowS
StartSimulationJobBatchResponse -> String
(Int -> StartSimulationJobBatchResponse -> ShowS)
-> (StartSimulationJobBatchResponse -> String)
-> ([StartSimulationJobBatchResponse] -> ShowS)
-> Show StartSimulationJobBatchResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSimulationJobBatchResponse] -> ShowS
$cshowList :: [StartSimulationJobBatchResponse] -> ShowS
show :: StartSimulationJobBatchResponse -> String
$cshow :: StartSimulationJobBatchResponse -> String
showsPrec :: Int -> StartSimulationJobBatchResponse -> ShowS
$cshowsPrec :: Int -> StartSimulationJobBatchResponse -> ShowS
Prelude.Show, (forall x.
 StartSimulationJobBatchResponse
 -> Rep StartSimulationJobBatchResponse x)
-> (forall x.
    Rep StartSimulationJobBatchResponse x
    -> StartSimulationJobBatchResponse)
-> Generic StartSimulationJobBatchResponse
forall x.
Rep StartSimulationJobBatchResponse x
-> StartSimulationJobBatchResponse
forall x.
StartSimulationJobBatchResponse
-> Rep StartSimulationJobBatchResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartSimulationJobBatchResponse x
-> StartSimulationJobBatchResponse
$cfrom :: forall x.
StartSimulationJobBatchResponse
-> Rep StartSimulationJobBatchResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartSimulationJobBatchResponse' 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:
--
-- 'failureReason', 'startSimulationJobBatchResponse_failureReason' - The reason the simulation job batch failed.
--
-- 'status', 'startSimulationJobBatchResponse_status' - The status of the simulation job batch.
--
-- [Pending]
--     The simulation job batch request is pending.
--
-- [InProgress]
--     The simulation job batch is in progress.
--
-- [Failed]
--     The simulation job batch failed. One or more simulation job requests
--     could not be completed due to an internal failure (like
--     @InternalServiceError@). See @failureCode@ and @failureReason@ for
--     more information.
--
-- [Completed]
--     The simulation batch job completed. A batch is complete when (1)
--     there are no pending simulation job requests in the batch and none
--     of the failed simulation job requests are due to
--     @InternalServiceError@ and (2) when all created simulation jobs have
--     reached a terminal state (for example, @Completed@ or @Failed@).
--
-- [Canceled]
--     The simulation batch job was cancelled.
--
-- [Canceling]
--     The simulation batch job is being cancelled.
--
-- [Completing]
--     The simulation batch job is completing.
--
-- [TimingOut]
--     The simulation job batch is timing out.
--
--     If a batch timing out, and there are pending requests that were
--     failing due to an internal failure (like @InternalServiceError@),
--     the batch status will be @Failed@. If there are no such failing
--     request, the batch status will be @TimedOut@.
--
-- [TimedOut]
--     The simulation batch job timed out.
--
-- 'arn', 'startSimulationJobBatchResponse_arn' - The Amazon Resource Name (arn) of the batch.
--
-- 'createdAt', 'startSimulationJobBatchResponse_createdAt' - The time, in milliseconds since the epoch, when the simulation job batch
-- was created.
--
-- 'failureCode', 'startSimulationJobBatchResponse_failureCode' - The failure code if the simulation job batch failed.
--
-- 'failedRequests', 'startSimulationJobBatchResponse_failedRequests' - A list of failed simulation job requests. The request failed to be
-- created into a simulation job. Failed requests do not have a simulation
-- job ID.
--
-- 'batchPolicy', 'startSimulationJobBatchResponse_batchPolicy' - The batch policy.
--
-- 'createdRequests', 'startSimulationJobBatchResponse_createdRequests' - A list of created simulation job request summaries.
--
-- 'pendingRequests', 'startSimulationJobBatchResponse_pendingRequests' - A list of pending simulation job requests. These requests have not yet
-- been created into simulation jobs.
--
-- 'clientRequestToken', 'startSimulationJobBatchResponse_clientRequestToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'tags', 'startSimulationJobBatchResponse_tags' - A map that contains tag keys and tag values that are attached to the
-- deployment job batch.
--
-- 'httpStatus', 'startSimulationJobBatchResponse_httpStatus' - The response's http status code.
newStartSimulationJobBatchResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartSimulationJobBatchResponse
newStartSimulationJobBatchResponse :: Int -> StartSimulationJobBatchResponse
newStartSimulationJobBatchResponse Int
pHttpStatus_ =
  StartSimulationJobBatchResponse' :: Maybe Text
-> Maybe SimulationJobBatchStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe SimulationJobBatchErrorCode
-> Maybe [FailedCreateSimulationJobRequest]
-> Maybe BatchPolicy
-> Maybe [SimulationJobSummary]
-> Maybe (NonEmpty SimulationJobRequest)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> StartSimulationJobBatchResponse
StartSimulationJobBatchResponse'
    { $sel:failureReason:StartSimulationJobBatchResponse' :: Maybe Text
failureReason =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:StartSimulationJobBatchResponse' :: Maybe SimulationJobBatchStatus
status = Maybe SimulationJobBatchStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:StartSimulationJobBatchResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:StartSimulationJobBatchResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:failureCode:StartSimulationJobBatchResponse' :: Maybe SimulationJobBatchErrorCode
failureCode = Maybe SimulationJobBatchErrorCode
forall a. Maybe a
Prelude.Nothing,
      $sel:failedRequests:StartSimulationJobBatchResponse' :: Maybe [FailedCreateSimulationJobRequest]
failedRequests = Maybe [FailedCreateSimulationJobRequest]
forall a. Maybe a
Prelude.Nothing,
      $sel:batchPolicy:StartSimulationJobBatchResponse' :: Maybe BatchPolicy
batchPolicy = Maybe BatchPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:createdRequests:StartSimulationJobBatchResponse' :: Maybe [SimulationJobSummary]
createdRequests = Maybe [SimulationJobSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingRequests:StartSimulationJobBatchResponse' :: Maybe (NonEmpty SimulationJobRequest)
pendingRequests = Maybe (NonEmpty SimulationJobRequest)
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:StartSimulationJobBatchResponse' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StartSimulationJobBatchResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartSimulationJobBatchResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The reason the simulation job batch failed.
startSimulationJobBatchResponse_failureReason :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe Prelude.Text)
startSimulationJobBatchResponse_failureReason :: (Maybe Text -> f (Maybe Text))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_failureReason = (StartSimulationJobBatchResponse -> Maybe Text)
-> (StartSimulationJobBatchResponse
    -> Maybe Text -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe Text
a -> StartSimulationJobBatchResponse
s {$sel:failureReason:StartSimulationJobBatchResponse' :: Maybe Text
failureReason = Maybe Text
a} :: StartSimulationJobBatchResponse)

-- | The status of the simulation job batch.
--
-- [Pending]
--     The simulation job batch request is pending.
--
-- [InProgress]
--     The simulation job batch is in progress.
--
-- [Failed]
--     The simulation job batch failed. One or more simulation job requests
--     could not be completed due to an internal failure (like
--     @InternalServiceError@). See @failureCode@ and @failureReason@ for
--     more information.
--
-- [Completed]
--     The simulation batch job completed. A batch is complete when (1)
--     there are no pending simulation job requests in the batch and none
--     of the failed simulation job requests are due to
--     @InternalServiceError@ and (2) when all created simulation jobs have
--     reached a terminal state (for example, @Completed@ or @Failed@).
--
-- [Canceled]
--     The simulation batch job was cancelled.
--
-- [Canceling]
--     The simulation batch job is being cancelled.
--
-- [Completing]
--     The simulation batch job is completing.
--
-- [TimingOut]
--     The simulation job batch is timing out.
--
--     If a batch timing out, and there are pending requests that were
--     failing due to an internal failure (like @InternalServiceError@),
--     the batch status will be @Failed@. If there are no such failing
--     request, the batch status will be @TimedOut@.
--
-- [TimedOut]
--     The simulation batch job timed out.
startSimulationJobBatchResponse_status :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe SimulationJobBatchStatus)
startSimulationJobBatchResponse_status :: (Maybe SimulationJobBatchStatus
 -> f (Maybe SimulationJobBatchStatus))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_status = (StartSimulationJobBatchResponse -> Maybe SimulationJobBatchStatus)
-> (StartSimulationJobBatchResponse
    -> Maybe SimulationJobBatchStatus
    -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe SimulationJobBatchStatus)
     (Maybe SimulationJobBatchStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe SimulationJobBatchStatus
status :: Maybe SimulationJobBatchStatus
$sel:status:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse -> Maybe SimulationJobBatchStatus
status} -> Maybe SimulationJobBatchStatus
status) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe SimulationJobBatchStatus
a -> StartSimulationJobBatchResponse
s {$sel:status:StartSimulationJobBatchResponse' :: Maybe SimulationJobBatchStatus
status = Maybe SimulationJobBatchStatus
a} :: StartSimulationJobBatchResponse)

-- | The Amazon Resource Name (arn) of the batch.
startSimulationJobBatchResponse_arn :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe Prelude.Text)
startSimulationJobBatchResponse_arn :: (Maybe Text -> f (Maybe Text))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_arn = (StartSimulationJobBatchResponse -> Maybe Text)
-> (StartSimulationJobBatchResponse
    -> Maybe Text -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe Text
a -> StartSimulationJobBatchResponse
s {$sel:arn:StartSimulationJobBatchResponse' :: Maybe Text
arn = Maybe Text
a} :: StartSimulationJobBatchResponse)

-- | The time, in milliseconds since the epoch, when the simulation job batch
-- was created.
startSimulationJobBatchResponse_createdAt :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe Prelude.UTCTime)
startSimulationJobBatchResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_createdAt = (StartSimulationJobBatchResponse -> Maybe POSIX)
-> (StartSimulationJobBatchResponse
    -> Maybe POSIX -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe POSIX
a -> StartSimulationJobBatchResponse
s {$sel:createdAt:StartSimulationJobBatchResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: StartSimulationJobBatchResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> StartSimulationJobBatchResponse
 -> f StartSimulationJobBatchResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The failure code if the simulation job batch failed.
startSimulationJobBatchResponse_failureCode :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe SimulationJobBatchErrorCode)
startSimulationJobBatchResponse_failureCode :: (Maybe SimulationJobBatchErrorCode
 -> f (Maybe SimulationJobBatchErrorCode))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_failureCode = (StartSimulationJobBatchResponse
 -> Maybe SimulationJobBatchErrorCode)
-> (StartSimulationJobBatchResponse
    -> Maybe SimulationJobBatchErrorCode
    -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe SimulationJobBatchErrorCode)
     (Maybe SimulationJobBatchErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe SimulationJobBatchErrorCode
failureCode :: Maybe SimulationJobBatchErrorCode
$sel:failureCode:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse
-> Maybe SimulationJobBatchErrorCode
failureCode} -> Maybe SimulationJobBatchErrorCode
failureCode) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe SimulationJobBatchErrorCode
a -> StartSimulationJobBatchResponse
s {$sel:failureCode:StartSimulationJobBatchResponse' :: Maybe SimulationJobBatchErrorCode
failureCode = Maybe SimulationJobBatchErrorCode
a} :: StartSimulationJobBatchResponse)

-- | A list of failed simulation job requests. The request failed to be
-- created into a simulation job. Failed requests do not have a simulation
-- job ID.
startSimulationJobBatchResponse_failedRequests :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe [FailedCreateSimulationJobRequest])
startSimulationJobBatchResponse_failedRequests :: (Maybe [FailedCreateSimulationJobRequest]
 -> f (Maybe [FailedCreateSimulationJobRequest]))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_failedRequests = (StartSimulationJobBatchResponse
 -> Maybe [FailedCreateSimulationJobRequest])
-> (StartSimulationJobBatchResponse
    -> Maybe [FailedCreateSimulationJobRequest]
    -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe [FailedCreateSimulationJobRequest])
     (Maybe [FailedCreateSimulationJobRequest])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe [FailedCreateSimulationJobRequest]
failedRequests :: Maybe [FailedCreateSimulationJobRequest]
$sel:failedRequests:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse
-> Maybe [FailedCreateSimulationJobRequest]
failedRequests} -> Maybe [FailedCreateSimulationJobRequest]
failedRequests) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe [FailedCreateSimulationJobRequest]
a -> StartSimulationJobBatchResponse
s {$sel:failedRequests:StartSimulationJobBatchResponse' :: Maybe [FailedCreateSimulationJobRequest]
failedRequests = Maybe [FailedCreateSimulationJobRequest]
a} :: StartSimulationJobBatchResponse) ((Maybe [FailedCreateSimulationJobRequest]
  -> f (Maybe [FailedCreateSimulationJobRequest]))
 -> StartSimulationJobBatchResponse
 -> f StartSimulationJobBatchResponse)
-> ((Maybe [FailedCreateSimulationJobRequest]
     -> f (Maybe [FailedCreateSimulationJobRequest]))
    -> Maybe [FailedCreateSimulationJobRequest]
    -> f (Maybe [FailedCreateSimulationJobRequest]))
-> (Maybe [FailedCreateSimulationJobRequest]
    -> f (Maybe [FailedCreateSimulationJobRequest]))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [FailedCreateSimulationJobRequest]
  [FailedCreateSimulationJobRequest]
  [FailedCreateSimulationJobRequest]
  [FailedCreateSimulationJobRequest]
-> Iso
     (Maybe [FailedCreateSimulationJobRequest])
     (Maybe [FailedCreateSimulationJobRequest])
     (Maybe [FailedCreateSimulationJobRequest])
     (Maybe [FailedCreateSimulationJobRequest])
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
  [FailedCreateSimulationJobRequest]
  [FailedCreateSimulationJobRequest]
  [FailedCreateSimulationJobRequest]
  [FailedCreateSimulationJobRequest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The batch policy.
startSimulationJobBatchResponse_batchPolicy :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe BatchPolicy)
startSimulationJobBatchResponse_batchPolicy :: (Maybe BatchPolicy -> f (Maybe BatchPolicy))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_batchPolicy = (StartSimulationJobBatchResponse -> Maybe BatchPolicy)
-> (StartSimulationJobBatchResponse
    -> Maybe BatchPolicy -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe BatchPolicy)
     (Maybe BatchPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe BatchPolicy
batchPolicy :: Maybe BatchPolicy
$sel:batchPolicy:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse -> Maybe BatchPolicy
batchPolicy} -> Maybe BatchPolicy
batchPolicy) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe BatchPolicy
a -> StartSimulationJobBatchResponse
s {$sel:batchPolicy:StartSimulationJobBatchResponse' :: Maybe BatchPolicy
batchPolicy = Maybe BatchPolicy
a} :: StartSimulationJobBatchResponse)

-- | A list of created simulation job request summaries.
startSimulationJobBatchResponse_createdRequests :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe [SimulationJobSummary])
startSimulationJobBatchResponse_createdRequests :: (Maybe [SimulationJobSummary] -> f (Maybe [SimulationJobSummary]))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_createdRequests = (StartSimulationJobBatchResponse -> Maybe [SimulationJobSummary])
-> (StartSimulationJobBatchResponse
    -> Maybe [SimulationJobSummary] -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe [SimulationJobSummary])
     (Maybe [SimulationJobSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe [SimulationJobSummary]
createdRequests :: Maybe [SimulationJobSummary]
$sel:createdRequests:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse -> Maybe [SimulationJobSummary]
createdRequests} -> Maybe [SimulationJobSummary]
createdRequests) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe [SimulationJobSummary]
a -> StartSimulationJobBatchResponse
s {$sel:createdRequests:StartSimulationJobBatchResponse' :: Maybe [SimulationJobSummary]
createdRequests = Maybe [SimulationJobSummary]
a} :: StartSimulationJobBatchResponse) ((Maybe [SimulationJobSummary] -> f (Maybe [SimulationJobSummary]))
 -> StartSimulationJobBatchResponse
 -> f StartSimulationJobBatchResponse)
-> ((Maybe [SimulationJobSummary]
     -> f (Maybe [SimulationJobSummary]))
    -> Maybe [SimulationJobSummary]
    -> f (Maybe [SimulationJobSummary]))
-> (Maybe [SimulationJobSummary]
    -> f (Maybe [SimulationJobSummary]))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SimulationJobSummary]
  [SimulationJobSummary]
  [SimulationJobSummary]
  [SimulationJobSummary]
-> Iso
     (Maybe [SimulationJobSummary])
     (Maybe [SimulationJobSummary])
     (Maybe [SimulationJobSummary])
     (Maybe [SimulationJobSummary])
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
  [SimulationJobSummary]
  [SimulationJobSummary]
  [SimulationJobSummary]
  [SimulationJobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of pending simulation job requests. These requests have not yet
-- been created into simulation jobs.
startSimulationJobBatchResponse_pendingRequests :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe (Prelude.NonEmpty SimulationJobRequest))
startSimulationJobBatchResponse_pendingRequests :: (Maybe (NonEmpty SimulationJobRequest)
 -> f (Maybe (NonEmpty SimulationJobRequest)))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_pendingRequests = (StartSimulationJobBatchResponse
 -> Maybe (NonEmpty SimulationJobRequest))
-> (StartSimulationJobBatchResponse
    -> Maybe (NonEmpty SimulationJobRequest)
    -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe (NonEmpty SimulationJobRequest))
     (Maybe (NonEmpty SimulationJobRequest))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe (NonEmpty SimulationJobRequest)
pendingRequests :: Maybe (NonEmpty SimulationJobRequest)
$sel:pendingRequests:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse
-> Maybe (NonEmpty SimulationJobRequest)
pendingRequests} -> Maybe (NonEmpty SimulationJobRequest)
pendingRequests) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe (NonEmpty SimulationJobRequest)
a -> StartSimulationJobBatchResponse
s {$sel:pendingRequests:StartSimulationJobBatchResponse' :: Maybe (NonEmpty SimulationJobRequest)
pendingRequests = Maybe (NonEmpty SimulationJobRequest)
a} :: StartSimulationJobBatchResponse) ((Maybe (NonEmpty SimulationJobRequest)
  -> f (Maybe (NonEmpty SimulationJobRequest)))
 -> StartSimulationJobBatchResponse
 -> f StartSimulationJobBatchResponse)
-> ((Maybe (NonEmpty SimulationJobRequest)
     -> f (Maybe (NonEmpty SimulationJobRequest)))
    -> Maybe (NonEmpty SimulationJobRequest)
    -> f (Maybe (NonEmpty SimulationJobRequest)))
-> (Maybe (NonEmpty SimulationJobRequest)
    -> f (Maybe (NonEmpty SimulationJobRequest)))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty SimulationJobRequest)
  (NonEmpty SimulationJobRequest)
  (NonEmpty SimulationJobRequest)
  (NonEmpty SimulationJobRequest)
-> Iso
     (Maybe (NonEmpty SimulationJobRequest))
     (Maybe (NonEmpty SimulationJobRequest))
     (Maybe (NonEmpty SimulationJobRequest))
     (Maybe (NonEmpty SimulationJobRequest))
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
  (NonEmpty SimulationJobRequest)
  (NonEmpty SimulationJobRequest)
  (NonEmpty SimulationJobRequest)
  (NonEmpty SimulationJobRequest)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
startSimulationJobBatchResponse_clientRequestToken :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe Prelude.Text)
startSimulationJobBatchResponse_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_clientRequestToken = (StartSimulationJobBatchResponse -> Maybe Text)
-> (StartSimulationJobBatchResponse
    -> Maybe Text -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe Text
a -> StartSimulationJobBatchResponse
s {$sel:clientRequestToken:StartSimulationJobBatchResponse' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartSimulationJobBatchResponse)

-- | A map that contains tag keys and tag values that are attached to the
-- deployment job batch.
startSimulationJobBatchResponse_tags :: Lens.Lens' StartSimulationJobBatchResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startSimulationJobBatchResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_tags = (StartSimulationJobBatchResponse -> Maybe (HashMap Text Text))
-> (StartSimulationJobBatchResponse
    -> Maybe (HashMap Text Text) -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     (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 (\StartSimulationJobBatchResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Maybe (HashMap Text Text)
a -> StartSimulationJobBatchResponse
s {$sel:tags:StartSimulationJobBatchResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StartSimulationJobBatchResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> StartSimulationJobBatchResponse
 -> f StartSimulationJobBatchResponse)
-> ((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)))
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
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 response's http status code.
startSimulationJobBatchResponse_httpStatus :: Lens.Lens' StartSimulationJobBatchResponse Prelude.Int
startSimulationJobBatchResponse_httpStatus :: (Int -> f Int)
-> StartSimulationJobBatchResponse
-> f StartSimulationJobBatchResponse
startSimulationJobBatchResponse_httpStatus = (StartSimulationJobBatchResponse -> Int)
-> (StartSimulationJobBatchResponse
    -> Int -> StartSimulationJobBatchResponse)
-> Lens
     StartSimulationJobBatchResponse
     StartSimulationJobBatchResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSimulationJobBatchResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartSimulationJobBatchResponse' :: StartSimulationJobBatchResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartSimulationJobBatchResponse
s@StartSimulationJobBatchResponse' {} Int
a -> StartSimulationJobBatchResponse
s {$sel:httpStatus:StartSimulationJobBatchResponse' :: Int
httpStatus = Int
a} :: StartSimulationJobBatchResponse)

instance
  Prelude.NFData
    StartSimulationJobBatchResponse