{-# 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.BatchStop
-- 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)
--
-- Stops running resources
module Amazonka.MediaLive.BatchStop
  ( -- * Creating a Request
    BatchStop' (..),
    newBatchStop',

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

    -- * Destructuring the Response
    BatchStopResponse (..),
    newBatchStopResponse,

    -- * Response Lenses
    batchStopResponse_successful,
    batchStopResponse_failed,
    batchStopResponse_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 stop resources
--
-- /See:/ 'newBatchStop'' smart constructor.
data BatchStop' = BatchStop''
  { -- | List of channel IDs
    BatchStop' -> Maybe [Text]
channelIds :: Prelude.Maybe [Prelude.Text],
    -- | List of multiplex IDs
    BatchStop' -> Maybe [Text]
multiplexIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (BatchStop' -> BatchStop' -> Bool
(BatchStop' -> BatchStop' -> Bool)
-> (BatchStop' -> BatchStop' -> Bool) -> Eq BatchStop'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchStop' -> BatchStop' -> Bool
$c/= :: BatchStop' -> BatchStop' -> Bool
== :: BatchStop' -> BatchStop' -> Bool
$c== :: BatchStop' -> BatchStop' -> Bool
Prelude.Eq, ReadPrec [BatchStop']
ReadPrec BatchStop'
Int -> ReadS BatchStop'
ReadS [BatchStop']
(Int -> ReadS BatchStop')
-> ReadS [BatchStop']
-> ReadPrec BatchStop'
-> ReadPrec [BatchStop']
-> Read BatchStop'
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchStop']
$creadListPrec :: ReadPrec [BatchStop']
readPrec :: ReadPrec BatchStop'
$creadPrec :: ReadPrec BatchStop'
readList :: ReadS [BatchStop']
$creadList :: ReadS [BatchStop']
readsPrec :: Int -> ReadS BatchStop'
$creadsPrec :: Int -> ReadS BatchStop'
Prelude.Read, Int -> BatchStop' -> ShowS
[BatchStop'] -> ShowS
BatchStop' -> String
(Int -> BatchStop' -> ShowS)
-> (BatchStop' -> String)
-> ([BatchStop'] -> ShowS)
-> Show BatchStop'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchStop'] -> ShowS
$cshowList :: [BatchStop'] -> ShowS
show :: BatchStop' -> String
$cshow :: BatchStop' -> String
showsPrec :: Int -> BatchStop' -> ShowS
$cshowsPrec :: Int -> BatchStop' -> ShowS
Prelude.Show, (forall x. BatchStop' -> Rep BatchStop' x)
-> (forall x. Rep BatchStop' x -> BatchStop') -> Generic BatchStop'
forall x. Rep BatchStop' x -> BatchStop'
forall x. BatchStop' -> Rep BatchStop' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchStop' x -> BatchStop'
$cfrom :: forall x. BatchStop' -> Rep BatchStop' x
Prelude.Generic)

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

-- | List of channel IDs
batchStop'_channelIds :: Lens.Lens' BatchStop' (Prelude.Maybe [Prelude.Text])
batchStop'_channelIds :: (Maybe [Text] -> f (Maybe [Text])) -> BatchStop' -> f BatchStop'
batchStop'_channelIds = (BatchStop' -> Maybe [Text])
-> (BatchStop' -> Maybe [Text] -> BatchStop')
-> Lens BatchStop' BatchStop' (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchStop'' {Maybe [Text]
channelIds :: Maybe [Text]
$sel:channelIds:BatchStop'' :: BatchStop' -> Maybe [Text]
channelIds} -> Maybe [Text]
channelIds) (\s :: BatchStop'
s@BatchStop'' {} Maybe [Text]
a -> BatchStop'
s {$sel:channelIds:BatchStop'' :: Maybe [Text]
channelIds = Maybe [Text]
a} :: BatchStop') ((Maybe [Text] -> f (Maybe [Text])) -> BatchStop' -> f BatchStop')
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BatchStop'
-> f BatchStop'
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
batchStop'_multiplexIds :: Lens.Lens' BatchStop' (Prelude.Maybe [Prelude.Text])
batchStop'_multiplexIds :: (Maybe [Text] -> f (Maybe [Text])) -> BatchStop' -> f BatchStop'
batchStop'_multiplexIds = (BatchStop' -> Maybe [Text])
-> (BatchStop' -> Maybe [Text] -> BatchStop')
-> Lens BatchStop' BatchStop' (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchStop'' {Maybe [Text]
multiplexIds :: Maybe [Text]
$sel:multiplexIds:BatchStop'' :: BatchStop' -> Maybe [Text]
multiplexIds} -> Maybe [Text]
multiplexIds) (\s :: BatchStop'
s@BatchStop'' {} Maybe [Text]
a -> BatchStop'
s {$sel:multiplexIds:BatchStop'' :: Maybe [Text]
multiplexIds = Maybe [Text]
a} :: BatchStop') ((Maybe [Text] -> f (Maybe [Text])) -> BatchStop' -> f BatchStop')
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BatchStop'
-> f BatchStop'
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 BatchStop' where
  type AWSResponse BatchStop' = BatchStopResponse
  request :: BatchStop' -> Request BatchStop'
request = Service -> BatchStop' -> Request BatchStop'
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchStop'
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse BatchStop')))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchStop'))
-> Logger
-> Service
-> Proxy BatchStop'
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse BatchStop')))
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 -> BatchStopResponse
BatchStopResponse'
            (Maybe [BatchSuccessfulResultModel]
 -> Maybe [BatchFailedResultModel] -> Int -> BatchStopResponse)
-> Either String (Maybe [BatchSuccessfulResultModel])
-> Either
     String (Maybe [BatchFailedResultModel] -> Int -> BatchStopResponse)
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 -> BatchStopResponse)
-> Either String (Maybe [BatchFailedResultModel])
-> Either String (Int -> BatchStopResponse)
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 -> BatchStopResponse)
-> Either String Int -> Either String BatchStopResponse
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 BatchStop'

instance Prelude.NFData BatchStop'

instance Core.ToHeaders BatchStop' where
  toHeaders :: BatchStop' -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchStop' -> 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 BatchStop' where
  toJSON :: BatchStop' -> Value
toJSON BatchStop'' {Maybe [Text]
multiplexIds :: Maybe [Text]
channelIds :: Maybe [Text]
$sel:multiplexIds:BatchStop'' :: BatchStop' -> Maybe [Text]
$sel:channelIds:BatchStop'' :: BatchStop' -> 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 BatchStop' where
  toPath :: BatchStop' -> ByteString
toPath = ByteString -> BatchStop' -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/prod/batch/stop"

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

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

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

-- | List of successful operations
batchStopResponse_successful :: Lens.Lens' BatchStopResponse (Prelude.Maybe [BatchSuccessfulResultModel])
batchStopResponse_successful :: (Maybe [BatchSuccessfulResultModel]
 -> f (Maybe [BatchSuccessfulResultModel]))
-> BatchStopResponse -> f BatchStopResponse
batchStopResponse_successful = (BatchStopResponse -> Maybe [BatchSuccessfulResultModel])
-> (BatchStopResponse
    -> Maybe [BatchSuccessfulResultModel] -> BatchStopResponse)
-> Lens
     BatchStopResponse
     BatchStopResponse
     (Maybe [BatchSuccessfulResultModel])
     (Maybe [BatchSuccessfulResultModel])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchStopResponse' {Maybe [BatchSuccessfulResultModel]
successful :: Maybe [BatchSuccessfulResultModel]
$sel:successful:BatchStopResponse' :: BatchStopResponse -> Maybe [BatchSuccessfulResultModel]
successful} -> Maybe [BatchSuccessfulResultModel]
successful) (\s :: BatchStopResponse
s@BatchStopResponse' {} Maybe [BatchSuccessfulResultModel]
a -> BatchStopResponse
s {$sel:successful:BatchStopResponse' :: Maybe [BatchSuccessfulResultModel]
successful = Maybe [BatchSuccessfulResultModel]
a} :: BatchStopResponse) ((Maybe [BatchSuccessfulResultModel]
  -> f (Maybe [BatchSuccessfulResultModel]))
 -> BatchStopResponse -> f BatchStopResponse)
-> ((Maybe [BatchSuccessfulResultModel]
     -> f (Maybe [BatchSuccessfulResultModel]))
    -> Maybe [BatchSuccessfulResultModel]
    -> f (Maybe [BatchSuccessfulResultModel]))
-> (Maybe [BatchSuccessfulResultModel]
    -> f (Maybe [BatchSuccessfulResultModel]))
-> BatchStopResponse
-> f BatchStopResponse
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
batchStopResponse_failed :: Lens.Lens' BatchStopResponse (Prelude.Maybe [BatchFailedResultModel])
batchStopResponse_failed :: (Maybe [BatchFailedResultModel]
 -> f (Maybe [BatchFailedResultModel]))
-> BatchStopResponse -> f BatchStopResponse
batchStopResponse_failed = (BatchStopResponse -> Maybe [BatchFailedResultModel])
-> (BatchStopResponse
    -> Maybe [BatchFailedResultModel] -> BatchStopResponse)
-> Lens
     BatchStopResponse
     BatchStopResponse
     (Maybe [BatchFailedResultModel])
     (Maybe [BatchFailedResultModel])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchStopResponse' {Maybe [BatchFailedResultModel]
failed :: Maybe [BatchFailedResultModel]
$sel:failed:BatchStopResponse' :: BatchStopResponse -> Maybe [BatchFailedResultModel]
failed} -> Maybe [BatchFailedResultModel]
failed) (\s :: BatchStopResponse
s@BatchStopResponse' {} Maybe [BatchFailedResultModel]
a -> BatchStopResponse
s {$sel:failed:BatchStopResponse' :: Maybe [BatchFailedResultModel]
failed = Maybe [BatchFailedResultModel]
a} :: BatchStopResponse) ((Maybe [BatchFailedResultModel]
  -> f (Maybe [BatchFailedResultModel]))
 -> BatchStopResponse -> f BatchStopResponse)
-> ((Maybe [BatchFailedResultModel]
     -> f (Maybe [BatchFailedResultModel]))
    -> Maybe [BatchFailedResultModel]
    -> f (Maybe [BatchFailedResultModel]))
-> (Maybe [BatchFailedResultModel]
    -> f (Maybe [BatchFailedResultModel]))
-> BatchStopResponse
-> f BatchStopResponse
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.
batchStopResponse_httpStatus :: Lens.Lens' BatchStopResponse Prelude.Int
batchStopResponse_httpStatus :: (Int -> f Int) -> BatchStopResponse -> f BatchStopResponse
batchStopResponse_httpStatus = (BatchStopResponse -> Int)
-> (BatchStopResponse -> Int -> BatchStopResponse)
-> Lens BatchStopResponse BatchStopResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchStopResponse' {Int
httpStatus :: Int
$sel:httpStatus:BatchStopResponse' :: BatchStopResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: BatchStopResponse
s@BatchStopResponse' {} Int
a -> BatchStopResponse
s {$sel:httpStatus:BatchStopResponse' :: Int
httpStatus = Int
a} :: BatchStopResponse)

instance Prelude.NFData BatchStopResponse