{-# 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.OpsWorks.DescribeDeployments
-- 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)
--
-- Requests a description of a specified set of deployments.
--
-- This call accepts only one resource-identifying parameter.
--
-- __Required Permissions__: To use this action, an IAM user must have a
-- Show, Deploy, or Manage permissions level for the stack, or an attached
-- policy that explicitly grants permissions. For more information about
-- user permissions, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html Managing User Permissions>.
module Amazonka.OpsWorks.DescribeDeployments
  ( -- * Creating a Request
    DescribeDeployments (..),
    newDescribeDeployments,

    -- * Request Lenses
    describeDeployments_appId,
    describeDeployments_deploymentIds,
    describeDeployments_stackId,

    -- * Destructuring the Response
    DescribeDeploymentsResponse (..),
    newDescribeDeploymentsResponse,

    -- * Response Lenses
    describeDeploymentsResponse_deployments,
    describeDeploymentsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeDeployments' smart constructor.
data DescribeDeployments = DescribeDeployments'
  { -- | The app ID. If you include this parameter, the command returns a
    -- description of the commands associated with the specified app.
    DescribeDeployments -> Maybe Text
appId :: Prelude.Maybe Prelude.Text,
    -- | An array of deployment IDs to be described. If you include this
    -- parameter, the command returns a description of the specified
    -- deployments. Otherwise, it returns a description of every deployment.
    DescribeDeployments -> Maybe [Text]
deploymentIds :: Prelude.Maybe [Prelude.Text],
    -- | The stack ID. If you include this parameter, the command returns a
    -- description of the commands associated with the specified stack.
    DescribeDeployments -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeDeployments -> DescribeDeployments -> Bool
(DescribeDeployments -> DescribeDeployments -> Bool)
-> (DescribeDeployments -> DescribeDeployments -> Bool)
-> Eq DescribeDeployments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDeployments -> DescribeDeployments -> Bool
$c/= :: DescribeDeployments -> DescribeDeployments -> Bool
== :: DescribeDeployments -> DescribeDeployments -> Bool
$c== :: DescribeDeployments -> DescribeDeployments -> Bool
Prelude.Eq, ReadPrec [DescribeDeployments]
ReadPrec DescribeDeployments
Int -> ReadS DescribeDeployments
ReadS [DescribeDeployments]
(Int -> ReadS DescribeDeployments)
-> ReadS [DescribeDeployments]
-> ReadPrec DescribeDeployments
-> ReadPrec [DescribeDeployments]
-> Read DescribeDeployments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDeployments]
$creadListPrec :: ReadPrec [DescribeDeployments]
readPrec :: ReadPrec DescribeDeployments
$creadPrec :: ReadPrec DescribeDeployments
readList :: ReadS [DescribeDeployments]
$creadList :: ReadS [DescribeDeployments]
readsPrec :: Int -> ReadS DescribeDeployments
$creadsPrec :: Int -> ReadS DescribeDeployments
Prelude.Read, Int -> DescribeDeployments -> ShowS
[DescribeDeployments] -> ShowS
DescribeDeployments -> String
(Int -> DescribeDeployments -> ShowS)
-> (DescribeDeployments -> String)
-> ([DescribeDeployments] -> ShowS)
-> Show DescribeDeployments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDeployments] -> ShowS
$cshowList :: [DescribeDeployments] -> ShowS
show :: DescribeDeployments -> String
$cshow :: DescribeDeployments -> String
showsPrec :: Int -> DescribeDeployments -> ShowS
$cshowsPrec :: Int -> DescribeDeployments -> ShowS
Prelude.Show, (forall x. DescribeDeployments -> Rep DescribeDeployments x)
-> (forall x. Rep DescribeDeployments x -> DescribeDeployments)
-> Generic DescribeDeployments
forall x. Rep DescribeDeployments x -> DescribeDeployments
forall x. DescribeDeployments -> Rep DescribeDeployments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDeployments x -> DescribeDeployments
$cfrom :: forall x. DescribeDeployments -> Rep DescribeDeployments x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDeployments' 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:
--
-- 'appId', 'describeDeployments_appId' - The app ID. If you include this parameter, the command returns a
-- description of the commands associated with the specified app.
--
-- 'deploymentIds', 'describeDeployments_deploymentIds' - An array of deployment IDs to be described. If you include this
-- parameter, the command returns a description of the specified
-- deployments. Otherwise, it returns a description of every deployment.
--
-- 'stackId', 'describeDeployments_stackId' - The stack ID. If you include this parameter, the command returns a
-- description of the commands associated with the specified stack.
newDescribeDeployments ::
  DescribeDeployments
newDescribeDeployments :: DescribeDeployments
newDescribeDeployments =
  DescribeDeployments' :: Maybe Text -> Maybe [Text] -> Maybe Text -> DescribeDeployments
DescribeDeployments'
    { $sel:appId:DescribeDeployments' :: Maybe Text
appId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentIds:DescribeDeployments' :: Maybe [Text]
deploymentIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:DescribeDeployments' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The app ID. If you include this parameter, the command returns a
-- description of the commands associated with the specified app.
describeDeployments_appId :: Lens.Lens' DescribeDeployments (Prelude.Maybe Prelude.Text)
describeDeployments_appId :: (Maybe Text -> f (Maybe Text))
-> DescribeDeployments -> f DescribeDeployments
describeDeployments_appId = (DescribeDeployments -> Maybe Text)
-> (DescribeDeployments -> Maybe Text -> DescribeDeployments)
-> Lens
     DescribeDeployments DescribeDeployments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeployments' {Maybe Text
appId :: Maybe Text
$sel:appId:DescribeDeployments' :: DescribeDeployments -> Maybe Text
appId} -> Maybe Text
appId) (\s :: DescribeDeployments
s@DescribeDeployments' {} Maybe Text
a -> DescribeDeployments
s {$sel:appId:DescribeDeployments' :: Maybe Text
appId = Maybe Text
a} :: DescribeDeployments)

-- | An array of deployment IDs to be described. If you include this
-- parameter, the command returns a description of the specified
-- deployments. Otherwise, it returns a description of every deployment.
describeDeployments_deploymentIds :: Lens.Lens' DescribeDeployments (Prelude.Maybe [Prelude.Text])
describeDeployments_deploymentIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeDeployments -> f DescribeDeployments
describeDeployments_deploymentIds = (DescribeDeployments -> Maybe [Text])
-> (DescribeDeployments -> Maybe [Text] -> DescribeDeployments)
-> Lens
     DescribeDeployments
     DescribeDeployments
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeployments' {Maybe [Text]
deploymentIds :: Maybe [Text]
$sel:deploymentIds:DescribeDeployments' :: DescribeDeployments -> Maybe [Text]
deploymentIds} -> Maybe [Text]
deploymentIds) (\s :: DescribeDeployments
s@DescribeDeployments' {} Maybe [Text]
a -> DescribeDeployments
s {$sel:deploymentIds:DescribeDeployments' :: Maybe [Text]
deploymentIds = Maybe [Text]
a} :: DescribeDeployments) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeDeployments -> f DescribeDeployments)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeDeployments
-> f DescribeDeployments
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

-- | The stack ID. If you include this parameter, the command returns a
-- description of the commands associated with the specified stack.
describeDeployments_stackId :: Lens.Lens' DescribeDeployments (Prelude.Maybe Prelude.Text)
describeDeployments_stackId :: (Maybe Text -> f (Maybe Text))
-> DescribeDeployments -> f DescribeDeployments
describeDeployments_stackId = (DescribeDeployments -> Maybe Text)
-> (DescribeDeployments -> Maybe Text -> DescribeDeployments)
-> Lens
     DescribeDeployments DescribeDeployments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeployments' {Maybe Text
stackId :: Maybe Text
$sel:stackId:DescribeDeployments' :: DescribeDeployments -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: DescribeDeployments
s@DescribeDeployments' {} Maybe Text
a -> DescribeDeployments
s {$sel:stackId:DescribeDeployments' :: Maybe Text
stackId = Maybe Text
a} :: DescribeDeployments)

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

instance Prelude.NFData DescribeDeployments

instance Core.ToHeaders DescribeDeployments where
  toHeaders :: DescribeDeployments -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeDeployments -> 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
"OpsWorks_20130218.DescribeDeployments" ::
                          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 DescribeDeployments where
  toJSON :: DescribeDeployments -> Value
toJSON DescribeDeployments' {Maybe [Text]
Maybe Text
stackId :: Maybe Text
deploymentIds :: Maybe [Text]
appId :: Maybe Text
$sel:stackId:DescribeDeployments' :: DescribeDeployments -> Maybe Text
$sel:deploymentIds:DescribeDeployments' :: DescribeDeployments -> Maybe [Text]
$sel:appId:DescribeDeployments' :: DescribeDeployments -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AppId" 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
appId,
            (Text
"DeploymentIds" 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]
deploymentIds,
            (Text
"StackId" 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
stackId
          ]
      )

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

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

-- | Contains the response to a @DescribeDeployments@ request.
--
-- /See:/ 'newDescribeDeploymentsResponse' smart constructor.
data DescribeDeploymentsResponse = DescribeDeploymentsResponse'
  { -- | An array of @Deployment@ objects that describe the deployments.
    DescribeDeploymentsResponse -> Maybe [Deployment]
deployments :: Prelude.Maybe [Deployment],
    -- | The response's http status code.
    DescribeDeploymentsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDeploymentsResponse -> DescribeDeploymentsResponse -> Bool
(DescribeDeploymentsResponse
 -> DescribeDeploymentsResponse -> Bool)
-> (DescribeDeploymentsResponse
    -> DescribeDeploymentsResponse -> Bool)
-> Eq DescribeDeploymentsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDeploymentsResponse -> DescribeDeploymentsResponse -> Bool
$c/= :: DescribeDeploymentsResponse -> DescribeDeploymentsResponse -> Bool
== :: DescribeDeploymentsResponse -> DescribeDeploymentsResponse -> Bool
$c== :: DescribeDeploymentsResponse -> DescribeDeploymentsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDeploymentsResponse]
ReadPrec DescribeDeploymentsResponse
Int -> ReadS DescribeDeploymentsResponse
ReadS [DescribeDeploymentsResponse]
(Int -> ReadS DescribeDeploymentsResponse)
-> ReadS [DescribeDeploymentsResponse]
-> ReadPrec DescribeDeploymentsResponse
-> ReadPrec [DescribeDeploymentsResponse]
-> Read DescribeDeploymentsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDeploymentsResponse]
$creadListPrec :: ReadPrec [DescribeDeploymentsResponse]
readPrec :: ReadPrec DescribeDeploymentsResponse
$creadPrec :: ReadPrec DescribeDeploymentsResponse
readList :: ReadS [DescribeDeploymentsResponse]
$creadList :: ReadS [DescribeDeploymentsResponse]
readsPrec :: Int -> ReadS DescribeDeploymentsResponse
$creadsPrec :: Int -> ReadS DescribeDeploymentsResponse
Prelude.Read, Int -> DescribeDeploymentsResponse -> ShowS
[DescribeDeploymentsResponse] -> ShowS
DescribeDeploymentsResponse -> String
(Int -> DescribeDeploymentsResponse -> ShowS)
-> (DescribeDeploymentsResponse -> String)
-> ([DescribeDeploymentsResponse] -> ShowS)
-> Show DescribeDeploymentsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDeploymentsResponse] -> ShowS
$cshowList :: [DescribeDeploymentsResponse] -> ShowS
show :: DescribeDeploymentsResponse -> String
$cshow :: DescribeDeploymentsResponse -> String
showsPrec :: Int -> DescribeDeploymentsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDeploymentsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDeploymentsResponse -> Rep DescribeDeploymentsResponse x)
-> (forall x.
    Rep DescribeDeploymentsResponse x -> DescribeDeploymentsResponse)
-> Generic DescribeDeploymentsResponse
forall x.
Rep DescribeDeploymentsResponse x -> DescribeDeploymentsResponse
forall x.
DescribeDeploymentsResponse -> Rep DescribeDeploymentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDeploymentsResponse x -> DescribeDeploymentsResponse
$cfrom :: forall x.
DescribeDeploymentsResponse -> Rep DescribeDeploymentsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDeploymentsResponse' 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:
--
-- 'deployments', 'describeDeploymentsResponse_deployments' - An array of @Deployment@ objects that describe the deployments.
--
-- 'httpStatus', 'describeDeploymentsResponse_httpStatus' - The response's http status code.
newDescribeDeploymentsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDeploymentsResponse
newDescribeDeploymentsResponse :: Int -> DescribeDeploymentsResponse
newDescribeDeploymentsResponse Int
pHttpStatus_ =
  DescribeDeploymentsResponse' :: Maybe [Deployment] -> Int -> DescribeDeploymentsResponse
DescribeDeploymentsResponse'
    { $sel:deployments:DescribeDeploymentsResponse' :: Maybe [Deployment]
deployments =
        Maybe [Deployment]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDeploymentsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @Deployment@ objects that describe the deployments.
describeDeploymentsResponse_deployments :: Lens.Lens' DescribeDeploymentsResponse (Prelude.Maybe [Deployment])
describeDeploymentsResponse_deployments :: (Maybe [Deployment] -> f (Maybe [Deployment]))
-> DescribeDeploymentsResponse -> f DescribeDeploymentsResponse
describeDeploymentsResponse_deployments = (DescribeDeploymentsResponse -> Maybe [Deployment])
-> (DescribeDeploymentsResponse
    -> Maybe [Deployment] -> DescribeDeploymentsResponse)
-> Lens
     DescribeDeploymentsResponse
     DescribeDeploymentsResponse
     (Maybe [Deployment])
     (Maybe [Deployment])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeploymentsResponse' {Maybe [Deployment]
deployments :: Maybe [Deployment]
$sel:deployments:DescribeDeploymentsResponse' :: DescribeDeploymentsResponse -> Maybe [Deployment]
deployments} -> Maybe [Deployment]
deployments) (\s :: DescribeDeploymentsResponse
s@DescribeDeploymentsResponse' {} Maybe [Deployment]
a -> DescribeDeploymentsResponse
s {$sel:deployments:DescribeDeploymentsResponse' :: Maybe [Deployment]
deployments = Maybe [Deployment]
a} :: DescribeDeploymentsResponse) ((Maybe [Deployment] -> f (Maybe [Deployment]))
 -> DescribeDeploymentsResponse -> f DescribeDeploymentsResponse)
-> ((Maybe [Deployment] -> f (Maybe [Deployment]))
    -> Maybe [Deployment] -> f (Maybe [Deployment]))
-> (Maybe [Deployment] -> f (Maybe [Deployment]))
-> DescribeDeploymentsResponse
-> f DescribeDeploymentsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Deployment] [Deployment] [Deployment] [Deployment]
-> Iso
     (Maybe [Deployment])
     (Maybe [Deployment])
     (Maybe [Deployment])
     (Maybe [Deployment])
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 [Deployment] [Deployment] [Deployment] [Deployment]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeDeploymentsResponse