{-# 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.CodeDeploy.BatchGetApplicationRevisions
-- 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)
--
-- Gets information about one or more application revisions. The maximum
-- number of application revisions that can be returned is 25.
module Amazonka.CodeDeploy.BatchGetApplicationRevisions
  ( -- * Creating a Request
    BatchGetApplicationRevisions (..),
    newBatchGetApplicationRevisions,

    -- * Request Lenses
    batchGetApplicationRevisions_applicationName,
    batchGetApplicationRevisions_revisions,

    -- * Destructuring the Response
    BatchGetApplicationRevisionsResponse (..),
    newBatchGetApplicationRevisionsResponse,

    -- * Response Lenses
    batchGetApplicationRevisionsResponse_applicationName,
    batchGetApplicationRevisionsResponse_revisions,
    batchGetApplicationRevisionsResponse_errorMessage,
    batchGetApplicationRevisionsResponse_httpStatus,
  )
where

import Amazonka.CodeDeploy.Types
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

-- | Represents the input of a @BatchGetApplicationRevisions@ operation.
--
-- /See:/ 'newBatchGetApplicationRevisions' smart constructor.
data BatchGetApplicationRevisions = BatchGetApplicationRevisions'
  { -- | The name of an AWS CodeDeploy application about which to get revision
    -- information.
    BatchGetApplicationRevisions -> Text
applicationName :: Prelude.Text,
    -- | An array of @RevisionLocation@ objects that specify information to get
    -- about the application revisions, including type and location. The
    -- maximum number of @RevisionLocation@ objects you can specify is 25.
    BatchGetApplicationRevisions -> [RevisionLocation]
revisions :: [RevisionLocation]
  }
  deriving (BatchGetApplicationRevisions
-> BatchGetApplicationRevisions -> Bool
(BatchGetApplicationRevisions
 -> BatchGetApplicationRevisions -> Bool)
-> (BatchGetApplicationRevisions
    -> BatchGetApplicationRevisions -> Bool)
-> Eq BatchGetApplicationRevisions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetApplicationRevisions
-> BatchGetApplicationRevisions -> Bool
$c/= :: BatchGetApplicationRevisions
-> BatchGetApplicationRevisions -> Bool
== :: BatchGetApplicationRevisions
-> BatchGetApplicationRevisions -> Bool
$c== :: BatchGetApplicationRevisions
-> BatchGetApplicationRevisions -> Bool
Prelude.Eq, ReadPrec [BatchGetApplicationRevisions]
ReadPrec BatchGetApplicationRevisions
Int -> ReadS BatchGetApplicationRevisions
ReadS [BatchGetApplicationRevisions]
(Int -> ReadS BatchGetApplicationRevisions)
-> ReadS [BatchGetApplicationRevisions]
-> ReadPrec BatchGetApplicationRevisions
-> ReadPrec [BatchGetApplicationRevisions]
-> Read BatchGetApplicationRevisions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetApplicationRevisions]
$creadListPrec :: ReadPrec [BatchGetApplicationRevisions]
readPrec :: ReadPrec BatchGetApplicationRevisions
$creadPrec :: ReadPrec BatchGetApplicationRevisions
readList :: ReadS [BatchGetApplicationRevisions]
$creadList :: ReadS [BatchGetApplicationRevisions]
readsPrec :: Int -> ReadS BatchGetApplicationRevisions
$creadsPrec :: Int -> ReadS BatchGetApplicationRevisions
Prelude.Read, Int -> BatchGetApplicationRevisions -> ShowS
[BatchGetApplicationRevisions] -> ShowS
BatchGetApplicationRevisions -> String
(Int -> BatchGetApplicationRevisions -> ShowS)
-> (BatchGetApplicationRevisions -> String)
-> ([BatchGetApplicationRevisions] -> ShowS)
-> Show BatchGetApplicationRevisions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetApplicationRevisions] -> ShowS
$cshowList :: [BatchGetApplicationRevisions] -> ShowS
show :: BatchGetApplicationRevisions -> String
$cshow :: BatchGetApplicationRevisions -> String
showsPrec :: Int -> BatchGetApplicationRevisions -> ShowS
$cshowsPrec :: Int -> BatchGetApplicationRevisions -> ShowS
Prelude.Show, (forall x.
 BatchGetApplicationRevisions -> Rep BatchGetApplicationRevisions x)
-> (forall x.
    Rep BatchGetApplicationRevisions x -> BatchGetApplicationRevisions)
-> Generic BatchGetApplicationRevisions
forall x.
Rep BatchGetApplicationRevisions x -> BatchGetApplicationRevisions
forall x.
BatchGetApplicationRevisions -> Rep BatchGetApplicationRevisions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetApplicationRevisions x -> BatchGetApplicationRevisions
$cfrom :: forall x.
BatchGetApplicationRevisions -> Rep BatchGetApplicationRevisions x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetApplicationRevisions' 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:
--
-- 'applicationName', 'batchGetApplicationRevisions_applicationName' - The name of an AWS CodeDeploy application about which to get revision
-- information.
--
-- 'revisions', 'batchGetApplicationRevisions_revisions' - An array of @RevisionLocation@ objects that specify information to get
-- about the application revisions, including type and location. The
-- maximum number of @RevisionLocation@ objects you can specify is 25.
newBatchGetApplicationRevisions ::
  -- | 'applicationName'
  Prelude.Text ->
  BatchGetApplicationRevisions
newBatchGetApplicationRevisions :: Text -> BatchGetApplicationRevisions
newBatchGetApplicationRevisions Text
pApplicationName_ =
  BatchGetApplicationRevisions' :: Text -> [RevisionLocation] -> BatchGetApplicationRevisions
BatchGetApplicationRevisions'
    { $sel:applicationName:BatchGetApplicationRevisions' :: Text
applicationName =
        Text
pApplicationName_,
      $sel:revisions:BatchGetApplicationRevisions' :: [RevisionLocation]
revisions = [RevisionLocation]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The name of an AWS CodeDeploy application about which to get revision
-- information.
batchGetApplicationRevisions_applicationName :: Lens.Lens' BatchGetApplicationRevisions Prelude.Text
batchGetApplicationRevisions_applicationName :: (Text -> f Text)
-> BatchGetApplicationRevisions -> f BatchGetApplicationRevisions
batchGetApplicationRevisions_applicationName = (BatchGetApplicationRevisions -> Text)
-> (BatchGetApplicationRevisions
    -> Text -> BatchGetApplicationRevisions)
-> Lens
     BatchGetApplicationRevisions BatchGetApplicationRevisions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetApplicationRevisions' {Text
applicationName :: Text
$sel:applicationName:BatchGetApplicationRevisions' :: BatchGetApplicationRevisions -> Text
applicationName} -> Text
applicationName) (\s :: BatchGetApplicationRevisions
s@BatchGetApplicationRevisions' {} Text
a -> BatchGetApplicationRevisions
s {$sel:applicationName:BatchGetApplicationRevisions' :: Text
applicationName = Text
a} :: BatchGetApplicationRevisions)

-- | An array of @RevisionLocation@ objects that specify information to get
-- about the application revisions, including type and location. The
-- maximum number of @RevisionLocation@ objects you can specify is 25.
batchGetApplicationRevisions_revisions :: Lens.Lens' BatchGetApplicationRevisions [RevisionLocation]
batchGetApplicationRevisions_revisions :: ([RevisionLocation] -> f [RevisionLocation])
-> BatchGetApplicationRevisions -> f BatchGetApplicationRevisions
batchGetApplicationRevisions_revisions = (BatchGetApplicationRevisions -> [RevisionLocation])
-> (BatchGetApplicationRevisions
    -> [RevisionLocation] -> BatchGetApplicationRevisions)
-> Lens
     BatchGetApplicationRevisions
     BatchGetApplicationRevisions
     [RevisionLocation]
     [RevisionLocation]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetApplicationRevisions' {[RevisionLocation]
revisions :: [RevisionLocation]
$sel:revisions:BatchGetApplicationRevisions' :: BatchGetApplicationRevisions -> [RevisionLocation]
revisions} -> [RevisionLocation]
revisions) (\s :: BatchGetApplicationRevisions
s@BatchGetApplicationRevisions' {} [RevisionLocation]
a -> BatchGetApplicationRevisions
s {$sel:revisions:BatchGetApplicationRevisions' :: [RevisionLocation]
revisions = [RevisionLocation]
a} :: BatchGetApplicationRevisions) (([RevisionLocation] -> f [RevisionLocation])
 -> BatchGetApplicationRevisions -> f BatchGetApplicationRevisions)
-> (([RevisionLocation] -> f [RevisionLocation])
    -> [RevisionLocation] -> f [RevisionLocation])
-> ([RevisionLocation] -> f [RevisionLocation])
-> BatchGetApplicationRevisions
-> f BatchGetApplicationRevisions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RevisionLocation] -> f [RevisionLocation])
-> [RevisionLocation] -> f [RevisionLocation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchGetApplicationRevisions

instance Core.ToHeaders BatchGetApplicationRevisions where
  toHeaders :: BatchGetApplicationRevisions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchGetApplicationRevisions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CodeDeploy_20141006.BatchGetApplicationRevisions" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON BatchGetApplicationRevisions where
  toJSON :: BatchGetApplicationRevisions -> Value
toJSON BatchGetApplicationRevisions' {[RevisionLocation]
Text
revisions :: [RevisionLocation]
applicationName :: Text
$sel:revisions:BatchGetApplicationRevisions' :: BatchGetApplicationRevisions -> [RevisionLocation]
$sel:applicationName:BatchGetApplicationRevisions' :: BatchGetApplicationRevisions -> 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
"applicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"revisions" Text -> [RevisionLocation] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [RevisionLocation]
revisions)
          ]
      )

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

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

-- | Represents the output of a @BatchGetApplicationRevisions@ operation.
--
-- /See:/ 'newBatchGetApplicationRevisionsResponse' smart constructor.
data BatchGetApplicationRevisionsResponse = BatchGetApplicationRevisionsResponse'
  { -- | The name of the application that corresponds to the revisions.
    BatchGetApplicationRevisionsResponse -> Maybe Text
applicationName :: Prelude.Maybe Prelude.Text,
    -- | Additional information about the revisions, including the type and
    -- location.
    BatchGetApplicationRevisionsResponse -> Maybe [RevisionInfo]
revisions :: Prelude.Maybe [RevisionInfo],
    -- | Information about errors that might have occurred during the API call.
    BatchGetApplicationRevisionsResponse -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    BatchGetApplicationRevisionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchGetApplicationRevisionsResponse
-> BatchGetApplicationRevisionsResponse -> Bool
(BatchGetApplicationRevisionsResponse
 -> BatchGetApplicationRevisionsResponse -> Bool)
-> (BatchGetApplicationRevisionsResponse
    -> BatchGetApplicationRevisionsResponse -> Bool)
-> Eq BatchGetApplicationRevisionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetApplicationRevisionsResponse
-> BatchGetApplicationRevisionsResponse -> Bool
$c/= :: BatchGetApplicationRevisionsResponse
-> BatchGetApplicationRevisionsResponse -> Bool
== :: BatchGetApplicationRevisionsResponse
-> BatchGetApplicationRevisionsResponse -> Bool
$c== :: BatchGetApplicationRevisionsResponse
-> BatchGetApplicationRevisionsResponse -> Bool
Prelude.Eq, ReadPrec [BatchGetApplicationRevisionsResponse]
ReadPrec BatchGetApplicationRevisionsResponse
Int -> ReadS BatchGetApplicationRevisionsResponse
ReadS [BatchGetApplicationRevisionsResponse]
(Int -> ReadS BatchGetApplicationRevisionsResponse)
-> ReadS [BatchGetApplicationRevisionsResponse]
-> ReadPrec BatchGetApplicationRevisionsResponse
-> ReadPrec [BatchGetApplicationRevisionsResponse]
-> Read BatchGetApplicationRevisionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetApplicationRevisionsResponse]
$creadListPrec :: ReadPrec [BatchGetApplicationRevisionsResponse]
readPrec :: ReadPrec BatchGetApplicationRevisionsResponse
$creadPrec :: ReadPrec BatchGetApplicationRevisionsResponse
readList :: ReadS [BatchGetApplicationRevisionsResponse]
$creadList :: ReadS [BatchGetApplicationRevisionsResponse]
readsPrec :: Int -> ReadS BatchGetApplicationRevisionsResponse
$creadsPrec :: Int -> ReadS BatchGetApplicationRevisionsResponse
Prelude.Read, Int -> BatchGetApplicationRevisionsResponse -> ShowS
[BatchGetApplicationRevisionsResponse] -> ShowS
BatchGetApplicationRevisionsResponse -> String
(Int -> BatchGetApplicationRevisionsResponse -> ShowS)
-> (BatchGetApplicationRevisionsResponse -> String)
-> ([BatchGetApplicationRevisionsResponse] -> ShowS)
-> Show BatchGetApplicationRevisionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetApplicationRevisionsResponse] -> ShowS
$cshowList :: [BatchGetApplicationRevisionsResponse] -> ShowS
show :: BatchGetApplicationRevisionsResponse -> String
$cshow :: BatchGetApplicationRevisionsResponse -> String
showsPrec :: Int -> BatchGetApplicationRevisionsResponse -> ShowS
$cshowsPrec :: Int -> BatchGetApplicationRevisionsResponse -> ShowS
Prelude.Show, (forall x.
 BatchGetApplicationRevisionsResponse
 -> Rep BatchGetApplicationRevisionsResponse x)
-> (forall x.
    Rep BatchGetApplicationRevisionsResponse x
    -> BatchGetApplicationRevisionsResponse)
-> Generic BatchGetApplicationRevisionsResponse
forall x.
Rep BatchGetApplicationRevisionsResponse x
-> BatchGetApplicationRevisionsResponse
forall x.
BatchGetApplicationRevisionsResponse
-> Rep BatchGetApplicationRevisionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetApplicationRevisionsResponse x
-> BatchGetApplicationRevisionsResponse
$cfrom :: forall x.
BatchGetApplicationRevisionsResponse
-> Rep BatchGetApplicationRevisionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetApplicationRevisionsResponse' 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:
--
-- 'applicationName', 'batchGetApplicationRevisionsResponse_applicationName' - The name of the application that corresponds to the revisions.
--
-- 'revisions', 'batchGetApplicationRevisionsResponse_revisions' - Additional information about the revisions, including the type and
-- location.
--
-- 'errorMessage', 'batchGetApplicationRevisionsResponse_errorMessage' - Information about errors that might have occurred during the API call.
--
-- 'httpStatus', 'batchGetApplicationRevisionsResponse_httpStatus' - The response's http status code.
newBatchGetApplicationRevisionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchGetApplicationRevisionsResponse
newBatchGetApplicationRevisionsResponse :: Int -> BatchGetApplicationRevisionsResponse
newBatchGetApplicationRevisionsResponse Int
pHttpStatus_ =
  BatchGetApplicationRevisionsResponse' :: Maybe Text
-> Maybe [RevisionInfo]
-> Maybe Text
-> Int
-> BatchGetApplicationRevisionsResponse
BatchGetApplicationRevisionsResponse'
    { $sel:applicationName:BatchGetApplicationRevisionsResponse' :: Maybe Text
applicationName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:revisions:BatchGetApplicationRevisionsResponse' :: Maybe [RevisionInfo]
revisions = Maybe [RevisionInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:BatchGetApplicationRevisionsResponse' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchGetApplicationRevisionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the application that corresponds to the revisions.
batchGetApplicationRevisionsResponse_applicationName :: Lens.Lens' BatchGetApplicationRevisionsResponse (Prelude.Maybe Prelude.Text)
batchGetApplicationRevisionsResponse_applicationName :: (Maybe Text -> f (Maybe Text))
-> BatchGetApplicationRevisionsResponse
-> f BatchGetApplicationRevisionsResponse
batchGetApplicationRevisionsResponse_applicationName = (BatchGetApplicationRevisionsResponse -> Maybe Text)
-> (BatchGetApplicationRevisionsResponse
    -> Maybe Text -> BatchGetApplicationRevisionsResponse)
-> Lens
     BatchGetApplicationRevisionsResponse
     BatchGetApplicationRevisionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetApplicationRevisionsResponse' {Maybe Text
applicationName :: Maybe Text
$sel:applicationName:BatchGetApplicationRevisionsResponse' :: BatchGetApplicationRevisionsResponse -> Maybe Text
applicationName} -> Maybe Text
applicationName) (\s :: BatchGetApplicationRevisionsResponse
s@BatchGetApplicationRevisionsResponse' {} Maybe Text
a -> BatchGetApplicationRevisionsResponse
s {$sel:applicationName:BatchGetApplicationRevisionsResponse' :: Maybe Text
applicationName = Maybe Text
a} :: BatchGetApplicationRevisionsResponse)

-- | Additional information about the revisions, including the type and
-- location.
batchGetApplicationRevisionsResponse_revisions :: Lens.Lens' BatchGetApplicationRevisionsResponse (Prelude.Maybe [RevisionInfo])
batchGetApplicationRevisionsResponse_revisions :: (Maybe [RevisionInfo] -> f (Maybe [RevisionInfo]))
-> BatchGetApplicationRevisionsResponse
-> f BatchGetApplicationRevisionsResponse
batchGetApplicationRevisionsResponse_revisions = (BatchGetApplicationRevisionsResponse -> Maybe [RevisionInfo])
-> (BatchGetApplicationRevisionsResponse
    -> Maybe [RevisionInfo] -> BatchGetApplicationRevisionsResponse)
-> Lens
     BatchGetApplicationRevisionsResponse
     BatchGetApplicationRevisionsResponse
     (Maybe [RevisionInfo])
     (Maybe [RevisionInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetApplicationRevisionsResponse' {Maybe [RevisionInfo]
revisions :: Maybe [RevisionInfo]
$sel:revisions:BatchGetApplicationRevisionsResponse' :: BatchGetApplicationRevisionsResponse -> Maybe [RevisionInfo]
revisions} -> Maybe [RevisionInfo]
revisions) (\s :: BatchGetApplicationRevisionsResponse
s@BatchGetApplicationRevisionsResponse' {} Maybe [RevisionInfo]
a -> BatchGetApplicationRevisionsResponse
s {$sel:revisions:BatchGetApplicationRevisionsResponse' :: Maybe [RevisionInfo]
revisions = Maybe [RevisionInfo]
a} :: BatchGetApplicationRevisionsResponse) ((Maybe [RevisionInfo] -> f (Maybe [RevisionInfo]))
 -> BatchGetApplicationRevisionsResponse
 -> f BatchGetApplicationRevisionsResponse)
-> ((Maybe [RevisionInfo] -> f (Maybe [RevisionInfo]))
    -> Maybe [RevisionInfo] -> f (Maybe [RevisionInfo]))
-> (Maybe [RevisionInfo] -> f (Maybe [RevisionInfo]))
-> BatchGetApplicationRevisionsResponse
-> f BatchGetApplicationRevisionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [RevisionInfo] [RevisionInfo] [RevisionInfo] [RevisionInfo]
-> Iso
     (Maybe [RevisionInfo])
     (Maybe [RevisionInfo])
     (Maybe [RevisionInfo])
     (Maybe [RevisionInfo])
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 [RevisionInfo] [RevisionInfo] [RevisionInfo] [RevisionInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about errors that might have occurred during the API call.
batchGetApplicationRevisionsResponse_errorMessage :: Lens.Lens' BatchGetApplicationRevisionsResponse (Prelude.Maybe Prelude.Text)
batchGetApplicationRevisionsResponse_errorMessage :: (Maybe Text -> f (Maybe Text))
-> BatchGetApplicationRevisionsResponse
-> f BatchGetApplicationRevisionsResponse
batchGetApplicationRevisionsResponse_errorMessage = (BatchGetApplicationRevisionsResponse -> Maybe Text)
-> (BatchGetApplicationRevisionsResponse
    -> Maybe Text -> BatchGetApplicationRevisionsResponse)
-> Lens
     BatchGetApplicationRevisionsResponse
     BatchGetApplicationRevisionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetApplicationRevisionsResponse' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:BatchGetApplicationRevisionsResponse' :: BatchGetApplicationRevisionsResponse -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: BatchGetApplicationRevisionsResponse
s@BatchGetApplicationRevisionsResponse' {} Maybe Text
a -> BatchGetApplicationRevisionsResponse
s {$sel:errorMessage:BatchGetApplicationRevisionsResponse' :: Maybe Text
errorMessage = Maybe Text
a} :: BatchGetApplicationRevisionsResponse)

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

instance
  Prelude.NFData
    BatchGetApplicationRevisionsResponse