{-# 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.MediaLive.BatchStart
-- 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 existing resources
module Amazonka.MediaLive.BatchStart
  ( -- * Creating a Request
    BatchStart' (..),
    newBatchStart',

    -- * Request Lenses
    batchStart'_channelIds,
    batchStart'_multiplexIds,

    -- * Destructuring the Response
    BatchStartResponse (..),
    newBatchStartResponse,

    -- * Response Lenses
    batchStartResponse_successful,
    batchStartResponse_failed,
    batchStartResponse_httpStatus,
  )
where

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

-- | A request to start resources
--
-- /See:/ 'newBatchStart'' smart constructor.
data BatchStart' = BatchStart''
  { -- | List of channel IDs
    BatchStart' -> Maybe [Text]
channelIds :: Prelude.Maybe [Prelude.Text],
    -- | List of multiplex IDs
    BatchStart' -> Maybe [Text]
multiplexIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (BatchStart' -> BatchStart' -> Bool
(BatchStart' -> BatchStart' -> Bool)
-> (BatchStart' -> BatchStart' -> Bool) -> Eq BatchStart'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchStart' -> BatchStart' -> Bool
$c/= :: BatchStart' -> BatchStart' -> Bool
== :: BatchStart' -> BatchStart' -> Bool
$c== :: BatchStart' -> BatchStart' -> Bool
Prelude.Eq, ReadPrec [BatchStart']
ReadPrec BatchStart'
Int -> ReadS BatchStart'
ReadS [BatchStart']
(Int -> ReadS BatchStart')
-> ReadS [BatchStart']
-> ReadPrec BatchStart'
-> ReadPrec [BatchStart']
-> Read BatchStart'
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchStart']
$creadListPrec :: ReadPrec [BatchStart']
readPrec :: ReadPrec BatchStart'
$creadPrec :: ReadPrec BatchStart'
readList :: ReadS [BatchStart']
$creadList :: ReadS [BatchStart']
readsPrec :: Int -> ReadS BatchStart'
$creadsPrec :: Int -> ReadS BatchStart'
Prelude.Read, Int -> BatchStart' -> ShowS
[BatchStart'] -> ShowS
BatchStart' -> String
(Int -> BatchStart' -> ShowS)
-> (BatchStart' -> String)
-> ([BatchStart'] -> ShowS)
-> Show BatchStart'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchStart'] -> ShowS
$cshowList :: [BatchStart'] -> ShowS
show :: BatchStart' -> String
$cshow :: BatchStart' -> String
showsPrec :: Int -> BatchStart' -> ShowS
$cshowsPrec :: Int -> BatchStart' -> ShowS
Prelude.Show, (forall x. BatchStart' -> Rep BatchStart' x)
-> (forall x. Rep BatchStart' x -> BatchStart')
-> Generic BatchStart'
forall x. Rep BatchStart' x -> BatchStart'
forall x. BatchStart' -> Rep BatchStart' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchStart' x -> BatchStart'
$cfrom :: forall x. BatchStart' -> Rep BatchStart' x
Prelude.Generic)

-- |
-- Create a value of 'BatchStart'' 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:
--
-- 'channelIds', 'batchStart'_channelIds' - List of channel IDs
--
-- 'multiplexIds', 'batchStart'_multiplexIds' - List of multiplex IDs
newBatchStart' ::
  BatchStart'
newBatchStart' :: BatchStart'
newBatchStart' =
  BatchStart'' :: Maybe [Text] -> Maybe [Text] -> BatchStart'
BatchStart''
    { $sel:channelIds:BatchStart'' :: Maybe [Text]
channelIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:multiplexIds:BatchStart'' :: Maybe [Text]
multiplexIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
    }

-- | List of channel IDs
batchStart'_channelIds :: Lens.Lens' BatchStart' (Prelude.Maybe [Prelude.Text])
batchStart'_channelIds :: (Maybe [Text] -> f (Maybe [Text])) -> BatchStart' -> f BatchStart'
batchStart'_channelIds = (BatchStart' -> Maybe [Text])
-> (BatchStart' -> Maybe [Text] -> BatchStart')
-> Lens BatchStart' BatchStart' (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchStart'' {Maybe [Text]
channelIds :: Maybe [Text]
$sel:channelIds:BatchStart'' :: BatchStart' -> Maybe [Text]
channelIds} -> Maybe [Text]
channelIds) (\s :: BatchStart'
s@BatchStart'' {} Maybe [Text]
a -> BatchStart'
s {$sel:channelIds:BatchStart'' :: Maybe [Text]
channelIds = Maybe [Text]
a} :: BatchStart') ((Maybe [Text] -> f (Maybe [Text]))
 -> BatchStart' -> f BatchStart')
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BatchStart'
-> f BatchStart'
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | List of multiplex IDs
batchStart'_multiplexIds :: Lens.Lens' BatchStart' (Prelude.Maybe [Prelude.Text])
batchStart'_multiplexIds :: (Maybe [Text] -> f (Maybe [Text])) -> BatchStart' -> f BatchStart'
batchStart'_multiplexIds = (BatchStart' -> Maybe [Text])
-> (BatchStart' -> Maybe [Text] -> BatchStart')
-> Lens BatchStart' BatchStart' (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchStart'' {Maybe [Text]
multiplexIds :: Maybe [Text]
$sel:multiplexIds:BatchStart'' :: BatchStart' -> Maybe [Text]
multiplexIds} -> Maybe [Text]
multiplexIds) (\s :: BatchStart'
s@BatchStart'' {} Maybe [Text]
a -> BatchStart'
s {$sel:multiplexIds:BatchStart'' :: Maybe [Text]
multiplexIds = Maybe [Text]
a} :: BatchStart') ((Maybe [Text] -> f (Maybe [Text]))
 -> BatchStart' -> f BatchStart')
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BatchStart'
-> f BatchStart'
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchStart'

instance Core.ToHeaders BatchStart' where
  toHeaders :: BatchStart' -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchStart' -> 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 BatchStart' where
  toJSON :: BatchStart' -> Value
toJSON BatchStart'' {Maybe [Text]
multiplexIds :: Maybe [Text]
channelIds :: Maybe [Text]
$sel:multiplexIds:BatchStart'' :: BatchStart' -> Maybe [Text]
$sel:channelIds:BatchStart'' :: BatchStart' -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"channelIds" 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]
channelIds,
            (Text
"multiplexIds" 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]
multiplexIds
          ]
      )

instance Core.ToPath BatchStart' where
  toPath :: BatchStart' -> ByteString
toPath = ByteString -> BatchStart' -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/prod/batch/start"

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

-- | Placeholder documentation for BatchStartResponse
--
-- /See:/ 'newBatchStartResponse' smart constructor.
data BatchStartResponse = BatchStartResponse'
  { -- | List of successful operations
    BatchStartResponse -> Maybe [BatchSuccessfulResultModel]
successful :: Prelude.Maybe [BatchSuccessfulResultModel],
    -- | List of failed operations
    BatchStartResponse -> Maybe [BatchFailedResultModel]
failed :: Prelude.Maybe [BatchFailedResultModel],
    -- | The response's http status code.
    BatchStartResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchStartResponse -> BatchStartResponse -> Bool
(BatchStartResponse -> BatchStartResponse -> Bool)
-> (BatchStartResponse -> BatchStartResponse -> Bool)
-> Eq BatchStartResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchStartResponse -> BatchStartResponse -> Bool
$c/= :: BatchStartResponse -> BatchStartResponse -> Bool
== :: BatchStartResponse -> BatchStartResponse -> Bool
$c== :: BatchStartResponse -> BatchStartResponse -> Bool
Prelude.Eq, ReadPrec [BatchStartResponse]
ReadPrec BatchStartResponse
Int -> ReadS BatchStartResponse
ReadS [BatchStartResponse]
(Int -> ReadS BatchStartResponse)
-> ReadS [BatchStartResponse]
-> ReadPrec BatchStartResponse
-> ReadPrec [BatchStartResponse]
-> Read BatchStartResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchStartResponse]
$creadListPrec :: ReadPrec [BatchStartResponse]
readPrec :: ReadPrec BatchStartResponse
$creadPrec :: ReadPrec BatchStartResponse
readList :: ReadS [BatchStartResponse]
$creadList :: ReadS [BatchStartResponse]
readsPrec :: Int -> ReadS BatchStartResponse
$creadsPrec :: Int -> ReadS BatchStartResponse
Prelude.Read, Int -> BatchStartResponse -> ShowS
[BatchStartResponse] -> ShowS
BatchStartResponse -> String
(Int -> BatchStartResponse -> ShowS)
-> (BatchStartResponse -> String)
-> ([BatchStartResponse] -> ShowS)
-> Show BatchStartResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchStartResponse] -> ShowS
$cshowList :: [BatchStartResponse] -> ShowS
show :: BatchStartResponse -> String
$cshow :: BatchStartResponse -> String
showsPrec :: Int -> BatchStartResponse -> ShowS
$cshowsPrec :: Int -> BatchStartResponse -> ShowS
Prelude.Show, (forall x. BatchStartResponse -> Rep BatchStartResponse x)
-> (forall x. Rep BatchStartResponse x -> BatchStartResponse)
-> Generic BatchStartResponse
forall x. Rep BatchStartResponse x -> BatchStartResponse
forall x. BatchStartResponse -> Rep BatchStartResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchStartResponse x -> BatchStartResponse
$cfrom :: forall x. BatchStartResponse -> Rep BatchStartResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchStartResponse' 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:
--
-- 'successful', 'batchStartResponse_successful' - List of successful operations
--
-- 'failed', 'batchStartResponse_failed' - List of failed operations
--
-- 'httpStatus', 'batchStartResponse_httpStatus' - The response's http status code.
newBatchStartResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchStartResponse
newBatchStartResponse :: Int -> BatchStartResponse
newBatchStartResponse Int
pHttpStatus_ =
  BatchStartResponse' :: Maybe [BatchSuccessfulResultModel]
-> Maybe [BatchFailedResultModel] -> Int -> BatchStartResponse
BatchStartResponse'
    { $sel:successful:BatchStartResponse' :: Maybe [BatchSuccessfulResultModel]
successful = Maybe [BatchSuccessfulResultModel]
forall a. Maybe a
Prelude.Nothing,
      $sel:failed:BatchStartResponse' :: Maybe [BatchFailedResultModel]
failed = Maybe [BatchFailedResultModel]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchStartResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | List of successful operations
batchStartResponse_successful :: Lens.Lens' BatchStartResponse (Prelude.Maybe [BatchSuccessfulResultModel])
batchStartResponse_successful :: (Maybe [BatchSuccessfulResultModel]
 -> f (Maybe [BatchSuccessfulResultModel]))
-> BatchStartResponse -> f BatchStartResponse
batchStartResponse_successful = (BatchStartResponse -> Maybe [BatchSuccessfulResultModel])
-> (BatchStartResponse
    -> Maybe [BatchSuccessfulResultModel] -> BatchStartResponse)
-> Lens
     BatchStartResponse
     BatchStartResponse
     (Maybe [BatchSuccessfulResultModel])
     (Maybe [BatchSuccessfulResultModel])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchStartResponse' {Maybe [BatchSuccessfulResultModel]
successful :: Maybe [BatchSuccessfulResultModel]
$sel:successful:BatchStartResponse' :: BatchStartResponse -> Maybe [BatchSuccessfulResultModel]
successful} -> Maybe [BatchSuccessfulResultModel]
successful) (\s :: BatchStartResponse
s@BatchStartResponse' {} Maybe [BatchSuccessfulResultModel]
a -> BatchStartResponse
s {$sel:successful:BatchStartResponse' :: Maybe [BatchSuccessfulResultModel]
successful = Maybe [BatchSuccessfulResultModel]
a} :: BatchStartResponse) ((Maybe [BatchSuccessfulResultModel]
  -> f (Maybe [BatchSuccessfulResultModel]))
 -> BatchStartResponse -> f BatchStartResponse)
-> ((Maybe [BatchSuccessfulResultModel]
     -> f (Maybe [BatchSuccessfulResultModel]))
    -> Maybe [BatchSuccessfulResultModel]
    -> f (Maybe [BatchSuccessfulResultModel]))
-> (Maybe [BatchSuccessfulResultModel]
    -> f (Maybe [BatchSuccessfulResultModel]))
-> BatchStartResponse
-> f BatchStartResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BatchSuccessfulResultModel]
  [BatchSuccessfulResultModel]
  [BatchSuccessfulResultModel]
  [BatchSuccessfulResultModel]
-> Iso
     (Maybe [BatchSuccessfulResultModel])
     (Maybe [BatchSuccessfulResultModel])
     (Maybe [BatchSuccessfulResultModel])
     (Maybe [BatchSuccessfulResultModel])
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
  [BatchSuccessfulResultModel]
  [BatchSuccessfulResultModel]
  [BatchSuccessfulResultModel]
  [BatchSuccessfulResultModel]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | List of failed operations
batchStartResponse_failed :: Lens.Lens' BatchStartResponse (Prelude.Maybe [BatchFailedResultModel])
batchStartResponse_failed :: (Maybe [BatchFailedResultModel]
 -> f (Maybe [BatchFailedResultModel]))
-> BatchStartResponse -> f BatchStartResponse
batchStartResponse_failed = (BatchStartResponse -> Maybe [BatchFailedResultModel])
-> (BatchStartResponse
    -> Maybe [BatchFailedResultModel] -> BatchStartResponse)
-> Lens
     BatchStartResponse
     BatchStartResponse
     (Maybe [BatchFailedResultModel])
     (Maybe [BatchFailedResultModel])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchStartResponse' {Maybe [BatchFailedResultModel]
failed :: Maybe [BatchFailedResultModel]
$sel:failed:BatchStartResponse' :: BatchStartResponse -> Maybe [BatchFailedResultModel]
failed} -> Maybe [BatchFailedResultModel]
failed) (\s :: BatchStartResponse
s@BatchStartResponse' {} Maybe [BatchFailedResultModel]
a -> BatchStartResponse
s {$sel:failed:BatchStartResponse' :: Maybe [BatchFailedResultModel]
failed = Maybe [BatchFailedResultModel]
a} :: BatchStartResponse) ((Maybe [BatchFailedResultModel]
  -> f (Maybe [BatchFailedResultModel]))
 -> BatchStartResponse -> f BatchStartResponse)
-> ((Maybe [BatchFailedResultModel]
     -> f (Maybe [BatchFailedResultModel]))
    -> Maybe [BatchFailedResultModel]
    -> f (Maybe [BatchFailedResultModel]))
-> (Maybe [BatchFailedResultModel]
    -> f (Maybe [BatchFailedResultModel]))
-> BatchStartResponse
-> f BatchStartResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BatchFailedResultModel]
  [BatchFailedResultModel]
  [BatchFailedResultModel]
  [BatchFailedResultModel]
-> Iso
     (Maybe [BatchFailedResultModel])
     (Maybe [BatchFailedResultModel])
     (Maybe [BatchFailedResultModel])
     (Maybe [BatchFailedResultModel])
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
  [BatchFailedResultModel]
  [BatchFailedResultModel]
  [BatchFailedResultModel]
  [BatchFailedResultModel]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchStartResponse