{-# 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.DescribeSimulationJobBatch
-- 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)
--
-- Describes a simulation job batch.
module Amazonka.RobOMaker.DescribeSimulationJobBatch
  ( -- * Creating a Request
    DescribeSimulationJobBatch (..),
    newDescribeSimulationJobBatch,

    -- * Request Lenses
    describeSimulationJobBatch_batch,

    -- * Destructuring the Response
    DescribeSimulationJobBatchResponse (..),
    newDescribeSimulationJobBatchResponse,

    -- * Response Lenses
    describeSimulationJobBatchResponse_failureReason,
    describeSimulationJobBatchResponse_status,
    describeSimulationJobBatchResponse_lastUpdatedAt,
    describeSimulationJobBatchResponse_arn,
    describeSimulationJobBatchResponse_createdAt,
    describeSimulationJobBatchResponse_failureCode,
    describeSimulationJobBatchResponse_failedRequests,
    describeSimulationJobBatchResponse_batchPolicy,
    describeSimulationJobBatchResponse_createdRequests,
    describeSimulationJobBatchResponse_pendingRequests,
    describeSimulationJobBatchResponse_clientRequestToken,
    describeSimulationJobBatchResponse_tags,
    describeSimulationJobBatchResponse_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:/ 'newDescribeSimulationJobBatch' smart constructor.
data DescribeSimulationJobBatch = DescribeSimulationJobBatch'
  { -- | The id of the batch to describe.
    DescribeSimulationJobBatch -> Text
batch :: Prelude.Text
  }
  deriving (DescribeSimulationJobBatch -> DescribeSimulationJobBatch -> Bool
(DescribeSimulationJobBatch -> DescribeSimulationJobBatch -> Bool)
-> (DescribeSimulationJobBatch
    -> DescribeSimulationJobBatch -> Bool)
-> Eq DescribeSimulationJobBatch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSimulationJobBatch -> DescribeSimulationJobBatch -> Bool
$c/= :: DescribeSimulationJobBatch -> DescribeSimulationJobBatch -> Bool
== :: DescribeSimulationJobBatch -> DescribeSimulationJobBatch -> Bool
$c== :: DescribeSimulationJobBatch -> DescribeSimulationJobBatch -> Bool
Prelude.Eq, ReadPrec [DescribeSimulationJobBatch]
ReadPrec DescribeSimulationJobBatch
Int -> ReadS DescribeSimulationJobBatch
ReadS [DescribeSimulationJobBatch]
(Int -> ReadS DescribeSimulationJobBatch)
-> ReadS [DescribeSimulationJobBatch]
-> ReadPrec DescribeSimulationJobBatch
-> ReadPrec [DescribeSimulationJobBatch]
-> Read DescribeSimulationJobBatch
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSimulationJobBatch]
$creadListPrec :: ReadPrec [DescribeSimulationJobBatch]
readPrec :: ReadPrec DescribeSimulationJobBatch
$creadPrec :: ReadPrec DescribeSimulationJobBatch
readList :: ReadS [DescribeSimulationJobBatch]
$creadList :: ReadS [DescribeSimulationJobBatch]
readsPrec :: Int -> ReadS DescribeSimulationJobBatch
$creadsPrec :: Int -> ReadS DescribeSimulationJobBatch
Prelude.Read, Int -> DescribeSimulationJobBatch -> ShowS
[DescribeSimulationJobBatch] -> ShowS
DescribeSimulationJobBatch -> String
(Int -> DescribeSimulationJobBatch -> ShowS)
-> (DescribeSimulationJobBatch -> String)
-> ([DescribeSimulationJobBatch] -> ShowS)
-> Show DescribeSimulationJobBatch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSimulationJobBatch] -> ShowS
$cshowList :: [DescribeSimulationJobBatch] -> ShowS
show :: DescribeSimulationJobBatch -> String
$cshow :: DescribeSimulationJobBatch -> String
showsPrec :: Int -> DescribeSimulationJobBatch -> ShowS
$cshowsPrec :: Int -> DescribeSimulationJobBatch -> ShowS
Prelude.Show, (forall x.
 DescribeSimulationJobBatch -> Rep DescribeSimulationJobBatch x)
-> (forall x.
    Rep DescribeSimulationJobBatch x -> DescribeSimulationJobBatch)
-> Generic DescribeSimulationJobBatch
forall x.
Rep DescribeSimulationJobBatch x -> DescribeSimulationJobBatch
forall x.
DescribeSimulationJobBatch -> Rep DescribeSimulationJobBatch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSimulationJobBatch x -> DescribeSimulationJobBatch
$cfrom :: forall x.
DescribeSimulationJobBatch -> Rep DescribeSimulationJobBatch x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSimulationJobBatch' 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:
--
-- 'batch', 'describeSimulationJobBatch_batch' - The id of the batch to describe.
newDescribeSimulationJobBatch ::
  -- | 'batch'
  Prelude.Text ->
  DescribeSimulationJobBatch
newDescribeSimulationJobBatch :: Text -> DescribeSimulationJobBatch
newDescribeSimulationJobBatch Text
pBatch_ =
  DescribeSimulationJobBatch' :: Text -> DescribeSimulationJobBatch
DescribeSimulationJobBatch' {$sel:batch:DescribeSimulationJobBatch' :: Text
batch = Text
pBatch_}

-- | The id of the batch to describe.
describeSimulationJobBatch_batch :: Lens.Lens' DescribeSimulationJobBatch Prelude.Text
describeSimulationJobBatch_batch :: (Text -> f Text)
-> DescribeSimulationJobBatch -> f DescribeSimulationJobBatch
describeSimulationJobBatch_batch = (DescribeSimulationJobBatch -> Text)
-> (DescribeSimulationJobBatch
    -> Text -> DescribeSimulationJobBatch)
-> Lens
     DescribeSimulationJobBatch DescribeSimulationJobBatch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatch' {Text
batch :: Text
$sel:batch:DescribeSimulationJobBatch' :: DescribeSimulationJobBatch -> Text
batch} -> Text
batch) (\s :: DescribeSimulationJobBatch
s@DescribeSimulationJobBatch' {} Text
a -> DescribeSimulationJobBatch
s {$sel:batch:DescribeSimulationJobBatch' :: Text
batch = Text
a} :: DescribeSimulationJobBatch)

instance Core.AWSRequest DescribeSimulationJobBatch where
  type
    AWSResponse DescribeSimulationJobBatch =
      DescribeSimulationJobBatchResponse
  request :: DescribeSimulationJobBatch -> Request DescribeSimulationJobBatch
request = Service
-> DescribeSimulationJobBatch -> Request DescribeSimulationJobBatch
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeSimulationJobBatch
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSimulationJobBatch)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeSimulationJobBatch))
-> Logger
-> Service
-> Proxy DescribeSimulationJobBatch
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSimulationJobBatch)))
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 POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe SimulationJobBatchErrorCode
-> Maybe [FailedCreateSimulationJobRequest]
-> Maybe BatchPolicy
-> Maybe [SimulationJobSummary]
-> Maybe (NonEmpty SimulationJobRequest)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeSimulationJobBatchResponse
DescribeSimulationJobBatchResponse'
            (Maybe Text
 -> Maybe SimulationJobBatchStatus
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe SimulationJobBatchErrorCode
 -> Maybe [FailedCreateSimulationJobRequest]
 -> Maybe BatchPolicy
 -> Maybe [SimulationJobSummary]
 -> Maybe (NonEmpty SimulationJobRequest)
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe SimulationJobBatchStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe SimulationJobBatchErrorCode
      -> Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeSimulationJobBatchResponse)
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 POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe SimulationJobBatchErrorCode
   -> Maybe [FailedCreateSimulationJobRequest]
   -> Maybe BatchPolicy
   -> Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe SimulationJobBatchStatus)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe SimulationJobBatchErrorCode
      -> Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeSimulationJobBatchResponse)
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 POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe SimulationJobBatchErrorCode
   -> Maybe [FailedCreateSimulationJobRequest]
   -> Maybe BatchPolicy
   -> Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe SimulationJobBatchErrorCode
      -> Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeSimulationJobBatchResponse)
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
"lastUpdatedAt")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe SimulationJobBatchErrorCode
   -> Maybe [FailedCreateSimulationJobRequest]
   -> Maybe BatchPolicy
   -> Maybe [SimulationJobSummary]
   -> Maybe (NonEmpty SimulationJobRequest)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeSimulationJobBatchResponse)
-> 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
      -> DescribeSimulationJobBatchResponse)
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
   -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe SimulationJobBatchErrorCode
      -> Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeSimulationJobBatchResponse)
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
   -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe SimulationJobBatchErrorCode)
-> Either
     String
     (Maybe [FailedCreateSimulationJobRequest]
      -> Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeSimulationJobBatchResponse)
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
   -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe [FailedCreateSimulationJobRequest])
-> Either
     String
     (Maybe BatchPolicy
      -> Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeSimulationJobBatchResponse)
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
   -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe BatchPolicy)
-> Either
     String
     (Maybe [SimulationJobSummary]
      -> Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeSimulationJobBatchResponse)
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
   -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe [SimulationJobSummary])
-> Either
     String
     (Maybe (NonEmpty SimulationJobRequest)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeSimulationJobBatchResponse)
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
   -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe (NonEmpty SimulationJobRequest))
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeSimulationJobBatchResponse)
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
   -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> DescribeSimulationJobBatchResponse)
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 -> DescribeSimulationJobBatchResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeSimulationJobBatchResponse)
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 -> DescribeSimulationJobBatchResponse)
-> Either String Int
-> Either String DescribeSimulationJobBatchResponse
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 DescribeSimulationJobBatch

instance Prelude.NFData DescribeSimulationJobBatch

instance Core.ToHeaders DescribeSimulationJobBatch where
  toHeaders :: DescribeSimulationJobBatch -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeSimulationJobBatch -> 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 DescribeSimulationJobBatch where
  toJSON :: DescribeSimulationJobBatch -> Value
toJSON DescribeSimulationJobBatch' {Text
batch :: Text
$sel:batch:DescribeSimulationJobBatch' :: DescribeSimulationJobBatch -> 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
"batch" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
batch)]
      )

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

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

-- | /See:/ 'newDescribeSimulationJobBatchResponse' smart constructor.
data DescribeSimulationJobBatchResponse = DescribeSimulationJobBatchResponse'
  { -- | The reason the simulation job batch failed.
    DescribeSimulationJobBatchResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The status of the 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.
    DescribeSimulationJobBatchResponse
-> Maybe SimulationJobBatchStatus
status :: Prelude.Maybe SimulationJobBatchStatus,
    -- | The time, in milliseconds since the epoch, when the simulation job batch
    -- was last updated.
    DescribeSimulationJobBatchResponse -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the batch.
    DescribeSimulationJobBatchResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the simulation job batch
    -- was created.
    DescribeSimulationJobBatchResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The failure code of the simulation job batch.
    DescribeSimulationJobBatchResponse
-> Maybe SimulationJobBatchErrorCode
failureCode :: Prelude.Maybe SimulationJobBatchErrorCode,
    -- | A list of failed create simulation job requests. The request failed to
    -- be created into a simulation job. Failed requests do not have a
    -- simulation job ID.
    DescribeSimulationJobBatchResponse
-> Maybe [FailedCreateSimulationJobRequest]
failedRequests :: Prelude.Maybe [FailedCreateSimulationJobRequest],
    -- | The batch policy.
    DescribeSimulationJobBatchResponse -> Maybe BatchPolicy
batchPolicy :: Prelude.Maybe BatchPolicy,
    -- | A list of created simulation job summaries.
    DescribeSimulationJobBatchResponse -> Maybe [SimulationJobSummary]
createdRequests :: Prelude.Maybe [SimulationJobSummary],
    -- | A list of pending simulation job requests. These requests have not yet
    -- been created into simulation jobs.
    DescribeSimulationJobBatchResponse
-> Maybe (NonEmpty SimulationJobRequest)
pendingRequests :: Prelude.Maybe (Prelude.NonEmpty SimulationJobRequest),
    -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    DescribeSimulationJobBatchResponse -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | A map that contains tag keys and tag values that are attached to the
    -- simulation job batch.
    DescribeSimulationJobBatchResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeSimulationJobBatchResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSimulationJobBatchResponse
-> DescribeSimulationJobBatchResponse -> Bool
(DescribeSimulationJobBatchResponse
 -> DescribeSimulationJobBatchResponse -> Bool)
-> (DescribeSimulationJobBatchResponse
    -> DescribeSimulationJobBatchResponse -> Bool)
-> Eq DescribeSimulationJobBatchResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSimulationJobBatchResponse
-> DescribeSimulationJobBatchResponse -> Bool
$c/= :: DescribeSimulationJobBatchResponse
-> DescribeSimulationJobBatchResponse -> Bool
== :: DescribeSimulationJobBatchResponse
-> DescribeSimulationJobBatchResponse -> Bool
$c== :: DescribeSimulationJobBatchResponse
-> DescribeSimulationJobBatchResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSimulationJobBatchResponse]
ReadPrec DescribeSimulationJobBatchResponse
Int -> ReadS DescribeSimulationJobBatchResponse
ReadS [DescribeSimulationJobBatchResponse]
(Int -> ReadS DescribeSimulationJobBatchResponse)
-> ReadS [DescribeSimulationJobBatchResponse]
-> ReadPrec DescribeSimulationJobBatchResponse
-> ReadPrec [DescribeSimulationJobBatchResponse]
-> Read DescribeSimulationJobBatchResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSimulationJobBatchResponse]
$creadListPrec :: ReadPrec [DescribeSimulationJobBatchResponse]
readPrec :: ReadPrec DescribeSimulationJobBatchResponse
$creadPrec :: ReadPrec DescribeSimulationJobBatchResponse
readList :: ReadS [DescribeSimulationJobBatchResponse]
$creadList :: ReadS [DescribeSimulationJobBatchResponse]
readsPrec :: Int -> ReadS DescribeSimulationJobBatchResponse
$creadsPrec :: Int -> ReadS DescribeSimulationJobBatchResponse
Prelude.Read, Int -> DescribeSimulationJobBatchResponse -> ShowS
[DescribeSimulationJobBatchResponse] -> ShowS
DescribeSimulationJobBatchResponse -> String
(Int -> DescribeSimulationJobBatchResponse -> ShowS)
-> (DescribeSimulationJobBatchResponse -> String)
-> ([DescribeSimulationJobBatchResponse] -> ShowS)
-> Show DescribeSimulationJobBatchResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSimulationJobBatchResponse] -> ShowS
$cshowList :: [DescribeSimulationJobBatchResponse] -> ShowS
show :: DescribeSimulationJobBatchResponse -> String
$cshow :: DescribeSimulationJobBatchResponse -> String
showsPrec :: Int -> DescribeSimulationJobBatchResponse -> ShowS
$cshowsPrec :: Int -> DescribeSimulationJobBatchResponse -> ShowS
Prelude.Show, (forall x.
 DescribeSimulationJobBatchResponse
 -> Rep DescribeSimulationJobBatchResponse x)
-> (forall x.
    Rep DescribeSimulationJobBatchResponse x
    -> DescribeSimulationJobBatchResponse)
-> Generic DescribeSimulationJobBatchResponse
forall x.
Rep DescribeSimulationJobBatchResponse x
-> DescribeSimulationJobBatchResponse
forall x.
DescribeSimulationJobBatchResponse
-> Rep DescribeSimulationJobBatchResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSimulationJobBatchResponse x
-> DescribeSimulationJobBatchResponse
$cfrom :: forall x.
DescribeSimulationJobBatchResponse
-> Rep DescribeSimulationJobBatchResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSimulationJobBatchResponse' 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', 'describeSimulationJobBatchResponse_failureReason' - The reason the simulation job batch failed.
--
-- 'status', 'describeSimulationJobBatchResponse_status' - The status of the 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.
--
-- 'lastUpdatedAt', 'describeSimulationJobBatchResponse_lastUpdatedAt' - The time, in milliseconds since the epoch, when the simulation job batch
-- was last updated.
--
-- 'arn', 'describeSimulationJobBatchResponse_arn' - The Amazon Resource Name (ARN) of the batch.
--
-- 'createdAt', 'describeSimulationJobBatchResponse_createdAt' - The time, in milliseconds since the epoch, when the simulation job batch
-- was created.
--
-- 'failureCode', 'describeSimulationJobBatchResponse_failureCode' - The failure code of the simulation job batch.
--
-- 'failedRequests', 'describeSimulationJobBatchResponse_failedRequests' - A list of failed create simulation job requests. The request failed to
-- be created into a simulation job. Failed requests do not have a
-- simulation job ID.
--
-- 'batchPolicy', 'describeSimulationJobBatchResponse_batchPolicy' - The batch policy.
--
-- 'createdRequests', 'describeSimulationJobBatchResponse_createdRequests' - A list of created simulation job summaries.
--
-- 'pendingRequests', 'describeSimulationJobBatchResponse_pendingRequests' - A list of pending simulation job requests. These requests have not yet
-- been created into simulation jobs.
--
-- 'clientRequestToken', 'describeSimulationJobBatchResponse_clientRequestToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'tags', 'describeSimulationJobBatchResponse_tags' - A map that contains tag keys and tag values that are attached to the
-- simulation job batch.
--
-- 'httpStatus', 'describeSimulationJobBatchResponse_httpStatus' - The response's http status code.
newDescribeSimulationJobBatchResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSimulationJobBatchResponse
newDescribeSimulationJobBatchResponse :: Int -> DescribeSimulationJobBatchResponse
newDescribeSimulationJobBatchResponse Int
pHttpStatus_ =
  DescribeSimulationJobBatchResponse' :: Maybe Text
-> Maybe SimulationJobBatchStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe SimulationJobBatchErrorCode
-> Maybe [FailedCreateSimulationJobRequest]
-> Maybe BatchPolicy
-> Maybe [SimulationJobSummary]
-> Maybe (NonEmpty SimulationJobRequest)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeSimulationJobBatchResponse
DescribeSimulationJobBatchResponse'
    { $sel:failureReason:DescribeSimulationJobBatchResponse' :: Maybe Text
failureReason =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeSimulationJobBatchResponse' :: Maybe SimulationJobBatchStatus
status = Maybe SimulationJobBatchStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:DescribeSimulationJobBatchResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeSimulationJobBatchResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:DescribeSimulationJobBatchResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:failureCode:DescribeSimulationJobBatchResponse' :: Maybe SimulationJobBatchErrorCode
failureCode = Maybe SimulationJobBatchErrorCode
forall a. Maybe a
Prelude.Nothing,
      $sel:failedRequests:DescribeSimulationJobBatchResponse' :: Maybe [FailedCreateSimulationJobRequest]
failedRequests = Maybe [FailedCreateSimulationJobRequest]
forall a. Maybe a
Prelude.Nothing,
      $sel:batchPolicy:DescribeSimulationJobBatchResponse' :: Maybe BatchPolicy
batchPolicy = Maybe BatchPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:createdRequests:DescribeSimulationJobBatchResponse' :: Maybe [SimulationJobSummary]
createdRequests = Maybe [SimulationJobSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingRequests:DescribeSimulationJobBatchResponse' :: Maybe (NonEmpty SimulationJobRequest)
pendingRequests = Maybe (NonEmpty SimulationJobRequest)
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:DescribeSimulationJobBatchResponse' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeSimulationJobBatchResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSimulationJobBatchResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The status of the 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.
describeSimulationJobBatchResponse_status :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe SimulationJobBatchStatus)
describeSimulationJobBatchResponse_status :: (Maybe SimulationJobBatchStatus
 -> f (Maybe SimulationJobBatchStatus))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_status = (DescribeSimulationJobBatchResponse
 -> Maybe SimulationJobBatchStatus)
-> (DescribeSimulationJobBatchResponse
    -> Maybe SimulationJobBatchStatus
    -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe SimulationJobBatchStatus)
     (Maybe SimulationJobBatchStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe SimulationJobBatchStatus
status :: Maybe SimulationJobBatchStatus
$sel:status:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse
-> Maybe SimulationJobBatchStatus
status} -> Maybe SimulationJobBatchStatus
status) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe SimulationJobBatchStatus
a -> DescribeSimulationJobBatchResponse
s {$sel:status:DescribeSimulationJobBatchResponse' :: Maybe SimulationJobBatchStatus
status = Maybe SimulationJobBatchStatus
a} :: DescribeSimulationJobBatchResponse)

-- | The time, in milliseconds since the epoch, when the simulation job batch
-- was last updated.
describeSimulationJobBatchResponse_lastUpdatedAt :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe Prelude.UTCTime)
describeSimulationJobBatchResponse_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_lastUpdatedAt = (DescribeSimulationJobBatchResponse -> Maybe POSIX)
-> (DescribeSimulationJobBatchResponse
    -> Maybe POSIX -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe POSIX
a -> DescribeSimulationJobBatchResponse
s {$sel:lastUpdatedAt:DescribeSimulationJobBatchResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: DescribeSimulationJobBatchResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeSimulationJobBatchResponse
 -> f DescribeSimulationJobBatchResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
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 Amazon Resource Name (ARN) of the batch.
describeSimulationJobBatchResponse_arn :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe Prelude.Text)
describeSimulationJobBatchResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_arn = (DescribeSimulationJobBatchResponse -> Maybe Text)
-> (DescribeSimulationJobBatchResponse
    -> Maybe Text -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe Text
a -> DescribeSimulationJobBatchResponse
s {$sel:arn:DescribeSimulationJobBatchResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeSimulationJobBatchResponse)

-- | The time, in milliseconds since the epoch, when the simulation job batch
-- was created.
describeSimulationJobBatchResponse_createdAt :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe Prelude.UTCTime)
describeSimulationJobBatchResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_createdAt = (DescribeSimulationJobBatchResponse -> Maybe POSIX)
-> (DescribeSimulationJobBatchResponse
    -> Maybe POSIX -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe POSIX
a -> DescribeSimulationJobBatchResponse
s {$sel:createdAt:DescribeSimulationJobBatchResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DescribeSimulationJobBatchResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeSimulationJobBatchResponse
 -> f DescribeSimulationJobBatchResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
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 of the simulation job batch.
describeSimulationJobBatchResponse_failureCode :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe SimulationJobBatchErrorCode)
describeSimulationJobBatchResponse_failureCode :: (Maybe SimulationJobBatchErrorCode
 -> f (Maybe SimulationJobBatchErrorCode))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_failureCode = (DescribeSimulationJobBatchResponse
 -> Maybe SimulationJobBatchErrorCode)
-> (DescribeSimulationJobBatchResponse
    -> Maybe SimulationJobBatchErrorCode
    -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe SimulationJobBatchErrorCode)
     (Maybe SimulationJobBatchErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe SimulationJobBatchErrorCode
failureCode :: Maybe SimulationJobBatchErrorCode
$sel:failureCode:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse
-> Maybe SimulationJobBatchErrorCode
failureCode} -> Maybe SimulationJobBatchErrorCode
failureCode) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe SimulationJobBatchErrorCode
a -> DescribeSimulationJobBatchResponse
s {$sel:failureCode:DescribeSimulationJobBatchResponse' :: Maybe SimulationJobBatchErrorCode
failureCode = Maybe SimulationJobBatchErrorCode
a} :: DescribeSimulationJobBatchResponse)

-- | A list of failed create simulation job requests. The request failed to
-- be created into a simulation job. Failed requests do not have a
-- simulation job ID.
describeSimulationJobBatchResponse_failedRequests :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe [FailedCreateSimulationJobRequest])
describeSimulationJobBatchResponse_failedRequests :: (Maybe [FailedCreateSimulationJobRequest]
 -> f (Maybe [FailedCreateSimulationJobRequest]))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_failedRequests = (DescribeSimulationJobBatchResponse
 -> Maybe [FailedCreateSimulationJobRequest])
-> (DescribeSimulationJobBatchResponse
    -> Maybe [FailedCreateSimulationJobRequest]
    -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe [FailedCreateSimulationJobRequest])
     (Maybe [FailedCreateSimulationJobRequest])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe [FailedCreateSimulationJobRequest]
failedRequests :: Maybe [FailedCreateSimulationJobRequest]
$sel:failedRequests:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse
-> Maybe [FailedCreateSimulationJobRequest]
failedRequests} -> Maybe [FailedCreateSimulationJobRequest]
failedRequests) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe [FailedCreateSimulationJobRequest]
a -> DescribeSimulationJobBatchResponse
s {$sel:failedRequests:DescribeSimulationJobBatchResponse' :: Maybe [FailedCreateSimulationJobRequest]
failedRequests = Maybe [FailedCreateSimulationJobRequest]
a} :: DescribeSimulationJobBatchResponse) ((Maybe [FailedCreateSimulationJobRequest]
  -> f (Maybe [FailedCreateSimulationJobRequest]))
 -> DescribeSimulationJobBatchResponse
 -> f DescribeSimulationJobBatchResponse)
-> ((Maybe [FailedCreateSimulationJobRequest]
     -> f (Maybe [FailedCreateSimulationJobRequest]))
    -> Maybe [FailedCreateSimulationJobRequest]
    -> f (Maybe [FailedCreateSimulationJobRequest]))
-> (Maybe [FailedCreateSimulationJobRequest]
    -> f (Maybe [FailedCreateSimulationJobRequest]))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
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.
describeSimulationJobBatchResponse_batchPolicy :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe BatchPolicy)
describeSimulationJobBatchResponse_batchPolicy :: (Maybe BatchPolicy -> f (Maybe BatchPolicy))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_batchPolicy = (DescribeSimulationJobBatchResponse -> Maybe BatchPolicy)
-> (DescribeSimulationJobBatchResponse
    -> Maybe BatchPolicy -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe BatchPolicy)
     (Maybe BatchPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe BatchPolicy
batchPolicy :: Maybe BatchPolicy
$sel:batchPolicy:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse -> Maybe BatchPolicy
batchPolicy} -> Maybe BatchPolicy
batchPolicy) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe BatchPolicy
a -> DescribeSimulationJobBatchResponse
s {$sel:batchPolicy:DescribeSimulationJobBatchResponse' :: Maybe BatchPolicy
batchPolicy = Maybe BatchPolicy
a} :: DescribeSimulationJobBatchResponse)

-- | A list of created simulation job summaries.
describeSimulationJobBatchResponse_createdRequests :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe [SimulationJobSummary])
describeSimulationJobBatchResponse_createdRequests :: (Maybe [SimulationJobSummary] -> f (Maybe [SimulationJobSummary]))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_createdRequests = (DescribeSimulationJobBatchResponse
 -> Maybe [SimulationJobSummary])
-> (DescribeSimulationJobBatchResponse
    -> Maybe [SimulationJobSummary]
    -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe [SimulationJobSummary])
     (Maybe [SimulationJobSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe [SimulationJobSummary]
createdRequests :: Maybe [SimulationJobSummary]
$sel:createdRequests:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse -> Maybe [SimulationJobSummary]
createdRequests} -> Maybe [SimulationJobSummary]
createdRequests) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe [SimulationJobSummary]
a -> DescribeSimulationJobBatchResponse
s {$sel:createdRequests:DescribeSimulationJobBatchResponse' :: Maybe [SimulationJobSummary]
createdRequests = Maybe [SimulationJobSummary]
a} :: DescribeSimulationJobBatchResponse) ((Maybe [SimulationJobSummary] -> f (Maybe [SimulationJobSummary]))
 -> DescribeSimulationJobBatchResponse
 -> f DescribeSimulationJobBatchResponse)
-> ((Maybe [SimulationJobSummary]
     -> f (Maybe [SimulationJobSummary]))
    -> Maybe [SimulationJobSummary]
    -> f (Maybe [SimulationJobSummary]))
-> (Maybe [SimulationJobSummary]
    -> f (Maybe [SimulationJobSummary]))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
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.
describeSimulationJobBatchResponse_pendingRequests :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe (Prelude.NonEmpty SimulationJobRequest))
describeSimulationJobBatchResponse_pendingRequests :: (Maybe (NonEmpty SimulationJobRequest)
 -> f (Maybe (NonEmpty SimulationJobRequest)))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_pendingRequests = (DescribeSimulationJobBatchResponse
 -> Maybe (NonEmpty SimulationJobRequest))
-> (DescribeSimulationJobBatchResponse
    -> Maybe (NonEmpty SimulationJobRequest)
    -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe (NonEmpty SimulationJobRequest))
     (Maybe (NonEmpty SimulationJobRequest))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe (NonEmpty SimulationJobRequest)
pendingRequests :: Maybe (NonEmpty SimulationJobRequest)
$sel:pendingRequests:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse
-> Maybe (NonEmpty SimulationJobRequest)
pendingRequests} -> Maybe (NonEmpty SimulationJobRequest)
pendingRequests) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe (NonEmpty SimulationJobRequest)
a -> DescribeSimulationJobBatchResponse
s {$sel:pendingRequests:DescribeSimulationJobBatchResponse' :: Maybe (NonEmpty SimulationJobRequest)
pendingRequests = Maybe (NonEmpty SimulationJobRequest)
a} :: DescribeSimulationJobBatchResponse) ((Maybe (NonEmpty SimulationJobRequest)
  -> f (Maybe (NonEmpty SimulationJobRequest)))
 -> DescribeSimulationJobBatchResponse
 -> f DescribeSimulationJobBatchResponse)
-> ((Maybe (NonEmpty SimulationJobRequest)
     -> f (Maybe (NonEmpty SimulationJobRequest)))
    -> Maybe (NonEmpty SimulationJobRequest)
    -> f (Maybe (NonEmpty SimulationJobRequest)))
-> (Maybe (NonEmpty SimulationJobRequest)
    -> f (Maybe (NonEmpty SimulationJobRequest)))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
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.
describeSimulationJobBatchResponse_clientRequestToken :: Lens.Lens' DescribeSimulationJobBatchResponse (Prelude.Maybe Prelude.Text)
describeSimulationJobBatchResponse_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> DescribeSimulationJobBatchResponse
-> f DescribeSimulationJobBatchResponse
describeSimulationJobBatchResponse_clientRequestToken = (DescribeSimulationJobBatchResponse -> Maybe Text)
-> (DescribeSimulationJobBatchResponse
    -> Maybe Text -> DescribeSimulationJobBatchResponse)
-> Lens
     DescribeSimulationJobBatchResponse
     DescribeSimulationJobBatchResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSimulationJobBatchResponse' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:DescribeSimulationJobBatchResponse' :: DescribeSimulationJobBatchResponse -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: DescribeSimulationJobBatchResponse
s@DescribeSimulationJobBatchResponse' {} Maybe Text
a -> DescribeSimulationJobBatchResponse
s {$sel:clientRequestToken:DescribeSimulationJobBatchResponse' :: Maybe Text
clientRequestToken = Maybe Text
a} :: DescribeSimulationJobBatchResponse)

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

instance
  Prelude.NFData
    DescribeSimulationJobBatchResponse