{-# 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.BatchGetDeploymentGroups
-- 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 deployment groups.
module Amazonka.CodeDeploy.BatchGetDeploymentGroups
  ( -- * Creating a Request
    BatchGetDeploymentGroups (..),
    newBatchGetDeploymentGroups,

    -- * Request Lenses
    batchGetDeploymentGroups_applicationName,
    batchGetDeploymentGroups_deploymentGroupNames,

    -- * Destructuring the Response
    BatchGetDeploymentGroupsResponse (..),
    newBatchGetDeploymentGroupsResponse,

    -- * Response Lenses
    batchGetDeploymentGroupsResponse_deploymentGroupsInfo,
    batchGetDeploymentGroupsResponse_errorMessage,
    batchGetDeploymentGroupsResponse_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 @BatchGetDeploymentGroups@ operation.
--
-- /See:/ 'newBatchGetDeploymentGroups' smart constructor.
data BatchGetDeploymentGroups = BatchGetDeploymentGroups'
  { -- | The name of an AWS CodeDeploy application associated with the applicable
    -- IAM user or AWS account.
    BatchGetDeploymentGroups -> Text
applicationName :: Prelude.Text,
    -- | The names of the deployment groups.
    BatchGetDeploymentGroups -> [Text]
deploymentGroupNames :: [Prelude.Text]
  }
  deriving (BatchGetDeploymentGroups -> BatchGetDeploymentGroups -> Bool
(BatchGetDeploymentGroups -> BatchGetDeploymentGroups -> Bool)
-> (BatchGetDeploymentGroups -> BatchGetDeploymentGroups -> Bool)
-> Eq BatchGetDeploymentGroups
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetDeploymentGroups -> BatchGetDeploymentGroups -> Bool
$c/= :: BatchGetDeploymentGroups -> BatchGetDeploymentGroups -> Bool
== :: BatchGetDeploymentGroups -> BatchGetDeploymentGroups -> Bool
$c== :: BatchGetDeploymentGroups -> BatchGetDeploymentGroups -> Bool
Prelude.Eq, ReadPrec [BatchGetDeploymentGroups]
ReadPrec BatchGetDeploymentGroups
Int -> ReadS BatchGetDeploymentGroups
ReadS [BatchGetDeploymentGroups]
(Int -> ReadS BatchGetDeploymentGroups)
-> ReadS [BatchGetDeploymentGroups]
-> ReadPrec BatchGetDeploymentGroups
-> ReadPrec [BatchGetDeploymentGroups]
-> Read BatchGetDeploymentGroups
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetDeploymentGroups]
$creadListPrec :: ReadPrec [BatchGetDeploymentGroups]
readPrec :: ReadPrec BatchGetDeploymentGroups
$creadPrec :: ReadPrec BatchGetDeploymentGroups
readList :: ReadS [BatchGetDeploymentGroups]
$creadList :: ReadS [BatchGetDeploymentGroups]
readsPrec :: Int -> ReadS BatchGetDeploymentGroups
$creadsPrec :: Int -> ReadS BatchGetDeploymentGroups
Prelude.Read, Int -> BatchGetDeploymentGroups -> ShowS
[BatchGetDeploymentGroups] -> ShowS
BatchGetDeploymentGroups -> String
(Int -> BatchGetDeploymentGroups -> ShowS)
-> (BatchGetDeploymentGroups -> String)
-> ([BatchGetDeploymentGroups] -> ShowS)
-> Show BatchGetDeploymentGroups
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetDeploymentGroups] -> ShowS
$cshowList :: [BatchGetDeploymentGroups] -> ShowS
show :: BatchGetDeploymentGroups -> String
$cshow :: BatchGetDeploymentGroups -> String
showsPrec :: Int -> BatchGetDeploymentGroups -> ShowS
$cshowsPrec :: Int -> BatchGetDeploymentGroups -> ShowS
Prelude.Show, (forall x.
 BatchGetDeploymentGroups -> Rep BatchGetDeploymentGroups x)
-> (forall x.
    Rep BatchGetDeploymentGroups x -> BatchGetDeploymentGroups)
-> Generic BatchGetDeploymentGroups
forall x.
Rep BatchGetDeploymentGroups x -> BatchGetDeploymentGroups
forall x.
BatchGetDeploymentGroups -> Rep BatchGetDeploymentGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetDeploymentGroups x -> BatchGetDeploymentGroups
$cfrom :: forall x.
BatchGetDeploymentGroups -> Rep BatchGetDeploymentGroups x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetDeploymentGroups' 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', 'batchGetDeploymentGroups_applicationName' - The name of an AWS CodeDeploy application associated with the applicable
-- IAM user or AWS account.
--
-- 'deploymentGroupNames', 'batchGetDeploymentGroups_deploymentGroupNames' - The names of the deployment groups.
newBatchGetDeploymentGroups ::
  -- | 'applicationName'
  Prelude.Text ->
  BatchGetDeploymentGroups
newBatchGetDeploymentGroups :: Text -> BatchGetDeploymentGroups
newBatchGetDeploymentGroups Text
pApplicationName_ =
  BatchGetDeploymentGroups' :: Text -> [Text] -> BatchGetDeploymentGroups
BatchGetDeploymentGroups'
    { $sel:applicationName:BatchGetDeploymentGroups' :: Text
applicationName =
        Text
pApplicationName_,
      $sel:deploymentGroupNames:BatchGetDeploymentGroups' :: [Text]
deploymentGroupNames = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The name of an AWS CodeDeploy application associated with the applicable
-- IAM user or AWS account.
batchGetDeploymentGroups_applicationName :: Lens.Lens' BatchGetDeploymentGroups Prelude.Text
batchGetDeploymentGroups_applicationName :: (Text -> f Text)
-> BatchGetDeploymentGroups -> f BatchGetDeploymentGroups
batchGetDeploymentGroups_applicationName = (BatchGetDeploymentGroups -> Text)
-> (BatchGetDeploymentGroups -> Text -> BatchGetDeploymentGroups)
-> Lens BatchGetDeploymentGroups BatchGetDeploymentGroups Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetDeploymentGroups' {Text
applicationName :: Text
$sel:applicationName:BatchGetDeploymentGroups' :: BatchGetDeploymentGroups -> Text
applicationName} -> Text
applicationName) (\s :: BatchGetDeploymentGroups
s@BatchGetDeploymentGroups' {} Text
a -> BatchGetDeploymentGroups
s {$sel:applicationName:BatchGetDeploymentGroups' :: Text
applicationName = Text
a} :: BatchGetDeploymentGroups)

-- | The names of the deployment groups.
batchGetDeploymentGroups_deploymentGroupNames :: Lens.Lens' BatchGetDeploymentGroups [Prelude.Text]
batchGetDeploymentGroups_deploymentGroupNames :: ([Text] -> f [Text])
-> BatchGetDeploymentGroups -> f BatchGetDeploymentGroups
batchGetDeploymentGroups_deploymentGroupNames = (BatchGetDeploymentGroups -> [Text])
-> (BatchGetDeploymentGroups -> [Text] -> BatchGetDeploymentGroups)
-> Lens
     BatchGetDeploymentGroups BatchGetDeploymentGroups [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetDeploymentGroups' {[Text]
deploymentGroupNames :: [Text]
$sel:deploymentGroupNames:BatchGetDeploymentGroups' :: BatchGetDeploymentGroups -> [Text]
deploymentGroupNames} -> [Text]
deploymentGroupNames) (\s :: BatchGetDeploymentGroups
s@BatchGetDeploymentGroups' {} [Text]
a -> BatchGetDeploymentGroups
s {$sel:deploymentGroupNames:BatchGetDeploymentGroups' :: [Text]
deploymentGroupNames = [Text]
a} :: BatchGetDeploymentGroups) (([Text] -> f [Text])
 -> BatchGetDeploymentGroups -> f BatchGetDeploymentGroups)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> BatchGetDeploymentGroups
-> f BatchGetDeploymentGroups
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchGetDeploymentGroups

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

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

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

-- | Represents the output of a @BatchGetDeploymentGroups@ operation.
--
-- /See:/ 'newBatchGetDeploymentGroupsResponse' smart constructor.
data BatchGetDeploymentGroupsResponse = BatchGetDeploymentGroupsResponse'
  { -- | Information about the deployment groups.
    BatchGetDeploymentGroupsResponse -> Maybe [DeploymentGroupInfo]
deploymentGroupsInfo :: Prelude.Maybe [DeploymentGroupInfo],
    -- | Information about errors that might have occurred during the API call.
    BatchGetDeploymentGroupsResponse -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    BatchGetDeploymentGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchGetDeploymentGroupsResponse
-> BatchGetDeploymentGroupsResponse -> Bool
(BatchGetDeploymentGroupsResponse
 -> BatchGetDeploymentGroupsResponse -> Bool)
-> (BatchGetDeploymentGroupsResponse
    -> BatchGetDeploymentGroupsResponse -> Bool)
-> Eq BatchGetDeploymentGroupsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetDeploymentGroupsResponse
-> BatchGetDeploymentGroupsResponse -> Bool
$c/= :: BatchGetDeploymentGroupsResponse
-> BatchGetDeploymentGroupsResponse -> Bool
== :: BatchGetDeploymentGroupsResponse
-> BatchGetDeploymentGroupsResponse -> Bool
$c== :: BatchGetDeploymentGroupsResponse
-> BatchGetDeploymentGroupsResponse -> Bool
Prelude.Eq, ReadPrec [BatchGetDeploymentGroupsResponse]
ReadPrec BatchGetDeploymentGroupsResponse
Int -> ReadS BatchGetDeploymentGroupsResponse
ReadS [BatchGetDeploymentGroupsResponse]
(Int -> ReadS BatchGetDeploymentGroupsResponse)
-> ReadS [BatchGetDeploymentGroupsResponse]
-> ReadPrec BatchGetDeploymentGroupsResponse
-> ReadPrec [BatchGetDeploymentGroupsResponse]
-> Read BatchGetDeploymentGroupsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetDeploymentGroupsResponse]
$creadListPrec :: ReadPrec [BatchGetDeploymentGroupsResponse]
readPrec :: ReadPrec BatchGetDeploymentGroupsResponse
$creadPrec :: ReadPrec BatchGetDeploymentGroupsResponse
readList :: ReadS [BatchGetDeploymentGroupsResponse]
$creadList :: ReadS [BatchGetDeploymentGroupsResponse]
readsPrec :: Int -> ReadS BatchGetDeploymentGroupsResponse
$creadsPrec :: Int -> ReadS BatchGetDeploymentGroupsResponse
Prelude.Read, Int -> BatchGetDeploymentGroupsResponse -> ShowS
[BatchGetDeploymentGroupsResponse] -> ShowS
BatchGetDeploymentGroupsResponse -> String
(Int -> BatchGetDeploymentGroupsResponse -> ShowS)
-> (BatchGetDeploymentGroupsResponse -> String)
-> ([BatchGetDeploymentGroupsResponse] -> ShowS)
-> Show BatchGetDeploymentGroupsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetDeploymentGroupsResponse] -> ShowS
$cshowList :: [BatchGetDeploymentGroupsResponse] -> ShowS
show :: BatchGetDeploymentGroupsResponse -> String
$cshow :: BatchGetDeploymentGroupsResponse -> String
showsPrec :: Int -> BatchGetDeploymentGroupsResponse -> ShowS
$cshowsPrec :: Int -> BatchGetDeploymentGroupsResponse -> ShowS
Prelude.Show, (forall x.
 BatchGetDeploymentGroupsResponse
 -> Rep BatchGetDeploymentGroupsResponse x)
-> (forall x.
    Rep BatchGetDeploymentGroupsResponse x
    -> BatchGetDeploymentGroupsResponse)
-> Generic BatchGetDeploymentGroupsResponse
forall x.
Rep BatchGetDeploymentGroupsResponse x
-> BatchGetDeploymentGroupsResponse
forall x.
BatchGetDeploymentGroupsResponse
-> Rep BatchGetDeploymentGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetDeploymentGroupsResponse x
-> BatchGetDeploymentGroupsResponse
$cfrom :: forall x.
BatchGetDeploymentGroupsResponse
-> Rep BatchGetDeploymentGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetDeploymentGroupsResponse' 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:
--
-- 'deploymentGroupsInfo', 'batchGetDeploymentGroupsResponse_deploymentGroupsInfo' - Information about the deployment groups.
--
-- 'errorMessage', 'batchGetDeploymentGroupsResponse_errorMessage' - Information about errors that might have occurred during the API call.
--
-- 'httpStatus', 'batchGetDeploymentGroupsResponse_httpStatus' - The response's http status code.
newBatchGetDeploymentGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchGetDeploymentGroupsResponse
newBatchGetDeploymentGroupsResponse :: Int -> BatchGetDeploymentGroupsResponse
newBatchGetDeploymentGroupsResponse Int
pHttpStatus_ =
  BatchGetDeploymentGroupsResponse' :: Maybe [DeploymentGroupInfo]
-> Maybe Text -> Int -> BatchGetDeploymentGroupsResponse
BatchGetDeploymentGroupsResponse'
    { $sel:deploymentGroupsInfo:BatchGetDeploymentGroupsResponse' :: Maybe [DeploymentGroupInfo]
deploymentGroupsInfo =
        Maybe [DeploymentGroupInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:BatchGetDeploymentGroupsResponse' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchGetDeploymentGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the deployment groups.
batchGetDeploymentGroupsResponse_deploymentGroupsInfo :: Lens.Lens' BatchGetDeploymentGroupsResponse (Prelude.Maybe [DeploymentGroupInfo])
batchGetDeploymentGroupsResponse_deploymentGroupsInfo :: (Maybe [DeploymentGroupInfo] -> f (Maybe [DeploymentGroupInfo]))
-> BatchGetDeploymentGroupsResponse
-> f BatchGetDeploymentGroupsResponse
batchGetDeploymentGroupsResponse_deploymentGroupsInfo = (BatchGetDeploymentGroupsResponse -> Maybe [DeploymentGroupInfo])
-> (BatchGetDeploymentGroupsResponse
    -> Maybe [DeploymentGroupInfo] -> BatchGetDeploymentGroupsResponse)
-> Lens
     BatchGetDeploymentGroupsResponse
     BatchGetDeploymentGroupsResponse
     (Maybe [DeploymentGroupInfo])
     (Maybe [DeploymentGroupInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetDeploymentGroupsResponse' {Maybe [DeploymentGroupInfo]
deploymentGroupsInfo :: Maybe [DeploymentGroupInfo]
$sel:deploymentGroupsInfo:BatchGetDeploymentGroupsResponse' :: BatchGetDeploymentGroupsResponse -> Maybe [DeploymentGroupInfo]
deploymentGroupsInfo} -> Maybe [DeploymentGroupInfo]
deploymentGroupsInfo) (\s :: BatchGetDeploymentGroupsResponse
s@BatchGetDeploymentGroupsResponse' {} Maybe [DeploymentGroupInfo]
a -> BatchGetDeploymentGroupsResponse
s {$sel:deploymentGroupsInfo:BatchGetDeploymentGroupsResponse' :: Maybe [DeploymentGroupInfo]
deploymentGroupsInfo = Maybe [DeploymentGroupInfo]
a} :: BatchGetDeploymentGroupsResponse) ((Maybe [DeploymentGroupInfo] -> f (Maybe [DeploymentGroupInfo]))
 -> BatchGetDeploymentGroupsResponse
 -> f BatchGetDeploymentGroupsResponse)
-> ((Maybe [DeploymentGroupInfo]
     -> f (Maybe [DeploymentGroupInfo]))
    -> Maybe [DeploymentGroupInfo] -> f (Maybe [DeploymentGroupInfo]))
-> (Maybe [DeploymentGroupInfo] -> f (Maybe [DeploymentGroupInfo]))
-> BatchGetDeploymentGroupsResponse
-> f BatchGetDeploymentGroupsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DeploymentGroupInfo]
  [DeploymentGroupInfo]
  [DeploymentGroupInfo]
  [DeploymentGroupInfo]
-> Iso
     (Maybe [DeploymentGroupInfo])
     (Maybe [DeploymentGroupInfo])
     (Maybe [DeploymentGroupInfo])
     (Maybe [DeploymentGroupInfo])
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
  [DeploymentGroupInfo]
  [DeploymentGroupInfo]
  [DeploymentGroupInfo]
  [DeploymentGroupInfo]
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.
batchGetDeploymentGroupsResponse_errorMessage :: Lens.Lens' BatchGetDeploymentGroupsResponse (Prelude.Maybe Prelude.Text)
batchGetDeploymentGroupsResponse_errorMessage :: (Maybe Text -> f (Maybe Text))
-> BatchGetDeploymentGroupsResponse
-> f BatchGetDeploymentGroupsResponse
batchGetDeploymentGroupsResponse_errorMessage = (BatchGetDeploymentGroupsResponse -> Maybe Text)
-> (BatchGetDeploymentGroupsResponse
    -> Maybe Text -> BatchGetDeploymentGroupsResponse)
-> Lens
     BatchGetDeploymentGroupsResponse
     BatchGetDeploymentGroupsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetDeploymentGroupsResponse' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:BatchGetDeploymentGroupsResponse' :: BatchGetDeploymentGroupsResponse -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: BatchGetDeploymentGroupsResponse
s@BatchGetDeploymentGroupsResponse' {} Maybe Text
a -> BatchGetDeploymentGroupsResponse
s {$sel:errorMessage:BatchGetDeploymentGroupsResponse' :: Maybe Text
errorMessage = Maybe Text
a} :: BatchGetDeploymentGroupsResponse)

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

instance
  Prelude.NFData
    BatchGetDeploymentGroupsResponse